diff --git a/.github/gitleaks.toml b/.github/gitleaks.toml new file mode 100644 index 0000000..597c2b1 --- /dev/null +++ b/.github/gitleaks.toml @@ -0,0 +1,12 @@ +# gitleaks (keel-linux/.github, security-scan.yml): the default rules, less +# the upstream CRS regression tests, which are attack payloads on purpose and +# carry example tokens (the jwt.io sample JWT, made-up session and OAuth +# tokens). A new fixture is added here by path once it has been read. +[extend] +useDefault = true + +[[allowlists]] +description = "CRS regression test payloads, fake tokens on purpose" +paths = [ + '''^tests/regression/tests/.+\.yaml$''', +] diff --git a/.github/security-baseline b/.github/security-baseline new file mode 100644 index 0000000..b4e9ec5 --- /dev/null +++ b/.github/security-baseline @@ -0,0 +1,8 @@ +# Security scan baseline (keel-linux/.github, security-scan.yml): findings +# that were read and are not a risk, one per line, the fingerprint and why. +semgrep:bash.lang.best-practice.useless-cat.useless-cat:util/php-dictionary-gen/php-dictionary-creator.sh:7e62555e4944 style only: useless cat in a pipeline +semgrep:bash.lang.best-practice.useless-cat.useless-cat:util/php-dictionary-gen/php-dictionary-creator.sh:86547fbb70e6 style only: useless cat in a pipeline +semgrep:bash.lang.best-practice.useless-cat.useless-cat:util/php-dictionary-gen/php-dictionary-creator.sh:9acc3fca24d1 style only: useless cat in a pipeline +semgrep:bash.lang.security.ifs-tampering.ifs-tampering:util/php-dictionary-gen/php-dictionary-creator.sh:fdbe2dc66bc3 upstream maintainer tool, IFS=$'\n\t' is the usual strict mode, not attacker-controlled; not shipped in the package +shellcheck:SC2046:util/php-dictionary-gen/php-dictionary-creator.sh:aa779a9bbc62 shell lint, not a security risk: upstream maintainer tool, unquoted substitution over files it generates itself +shellcheck:SC2046:util/php-dictionary-gen/php-dictionary-creator.sh:ea41cfcd1687 shell lint, not a security risk: upstream maintainer tool, unquoted substitution over files it generates itself diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml new file mode 100644 index 0000000..b40ce41 --- /dev/null +++ b/.github/workflows/security.yml @@ -0,0 +1,19 @@ +# Security scanning (keel-linux/.github, profile/WORKFLOWS.md "Security +# scanning"): gitleaks, bandit, semgrep and shellcheck on GitHub-hosted +# runners, no secrets. Findings that are not a risk are listed, each with its +# justification, in .github/security-baseline; gitleaks fixtures, if any, in +# .github/gitleaks.toml. +name: security +on: + pull_request: + push: + branches: [keel/trixie] + workflow_dispatch: +permissions: + contents: read +jobs: + security: + uses: keel-linux/.github/.github/workflows/security-scan.yml@main + permissions: + contents: read + security-events: write