From 2197a1dde41c1cf854045cf3bb8438ae4861ed46 Mon Sep 17 00:00:00 2001 From: Uladzimir Tsykun Date: Sat, 25 Feb 2023 08:01:31 +0100 Subject: [PATCH] Added issue templates and security policy --- .github/ISSUE_TEMPLATE/1_bug-report.yaml | 60 ++++++++++++++++++++++++ .github/ISSUE_TEMPLATE/2_general.md | 7 +++ .github/ISSUE_TEMPLATE/config.yml | 5 ++ SECURITY.md | 6 +++ src/Mirror/RemoteProxyRepository.php | 2 +- 5 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 .github/ISSUE_TEMPLATE/1_bug-report.yaml create mode 100644 .github/ISSUE_TEMPLATE/2_general.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 SECURITY.md diff --git a/.github/ISSUE_TEMPLATE/1_bug-report.yaml b/.github/ISSUE_TEMPLATE/1_bug-report.yaml new file mode 100644 index 00000000..c9ca48a6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1_bug-report.yaml @@ -0,0 +1,60 @@ +name: Bug Report +description: Found something you weren't expecting? Report it here! +labels: kind/bug +body: + - type: markdown + attributes: + value: | + NOTE: Do not report security reports publicly. See Reporting a vulnerability policy https://github.com/vtsykun/packeton/security/policy + - type: markdown + attributes: + value: | + 1. Make sure you are using the latest release. + 2. Please give all relevant information below for bug reports: logs details, stack traces, environment. You can found exception logs in var/log/ + 3. Please provide steps how to reproduce. + - type: textarea + id: description + attributes: + label: Description + description: | + Please provide a description of your issue here. + - type: dropdown + id: demo-reproduce + attributes: + label: Can you reproduce the bug on the Packeton demo site? + description: | + If so, please provide a URL in the Description field + URL of Packeton demo: https://demo.packeton.org + options: + - "Not applicable" + - "Yes" + - "No" + - type: dropdown + id: database + attributes: + label: Database + description: What database system are you running? + options: + - PostgreSQL + - MySQL + - SQLite + - Other + - type: markdown + attributes: + value: | + It's really important to provide pertinent logs + In addition, if you can temporary enable dev mode with `APP_ENV=dev` and run `composer install` to install all dev dependencies to see errors in UI. + After tests, please do not forget disable dev mode, because it is not secure for production. + - type: textarea + id: screenshots + attributes: + label: Screenshots + description: If this issue involves the UX/UI bugs, please provide one or more screenshots + - type: textarea + id: run-info + attributes: + label: How are you running Packeton? + description: | + Please include information about environment, e.g. if it is being run from docker, a php-fpm, nginx etc + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/2_general.md b/.github/ISSUE_TEMPLATE/2_general.md new file mode 100644 index 00000000..45eaf478 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2_general.md @@ -0,0 +1,7 @@ +--- +name: Feature request/General Question +about: Report Feature requests and Questions + +--- + + diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..e6aa86cc --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: Reporting a vulnerability + url: https://github.com/vtsykun/packeton/security/policy + about: For security concerns, please send a mail privately instead of opening a public issue. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..e0b0d4c6 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,6 @@ +# Reporting a vulnerability + +If you have found any issues that might have security implications, +please send a report privately to tsykun314 [at] gmail.com or matrix @kasztelan:matrix.org + +Don't report security reports publicly. diff --git a/src/Mirror/RemoteProxyRepository.php b/src/Mirror/RemoteProxyRepository.php index 42cd2c8c..c4885251 100644 --- a/src/Mirror/RemoteProxyRepository.php +++ b/src/Mirror/RemoteProxyRepository.php @@ -142,7 +142,7 @@ protected function lookIncludePackageMetadata(array $data, string $package): arr } if (isset($data['packages'][$package])) { - return $data['packages'][$package]; + return $data['packages'][$package] ?: []; } if (isset($data['includes']) && \is_array($data['includes'])) {