From 0f61589f1c27109d6cdfbbcd0b1ffe47a89faacc Mon Sep 17 00:00:00 2001 From: navigator Date: Wed, 7 Oct 2026 17:57:24 +0000 Subject: [PATCH] ci: security scanning, with the findings read and justified Calls security-scan.yml of keel-linux/.github (gitleaks, bandit, semgrep, shellcheck on hosted runners, no secrets) on pull requests, pushes to master and by hand. Not a required check. Baseline from a scan of master, none a risk. B103 and semgrep's insecure-file-permissions: 0755 on scripts that must run in the build chroot. B324 and semgrep's MD5 rule: md5 keys a dict of comments, and fills the MD5sum field of a local Packages index beside SHA256. Plus six shellcheck warnings in share/initctl.dummy. gitleaks finds nothing. --- .github/security-baseline | 15 +++++++++++++++ .github/workflows/security.yml | 19 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .github/security-baseline create mode 100644 .github/workflows/security.yml diff --git a/.github/security-baseline b/.github/security-baseline new file mode 100644 index 0000000..25733b0 --- /dev/null +++ b/.github/security-baseline @@ -0,0 +1,15 @@ +# 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. +bandit:B103:fab:ffd27f9c28e2 a build script copied into the chroot's private temporary directory must be executable to run; 0755 grants no write +bandit:B103:fablib/installer.py:d10b35a2f4b7 RevertibleScript writes a script that must be executable; 0755 grants no write +bandit:B324:fablib/annotate.py:804854d3f4b1 md5 keys a dict of comments while annotating a plan, not a security digest +bandit:B324:fablib/installer.py:65a598eb8621 the MD5sum field of a local build-time Packages index, written beside SHA256, which apt verifies +semgrep:python.lang.security.audit.insecure-file-permissions.insecure-file-permissions:fab:ffd27f9c28e2 a build script copied into the chroot's private temporary directory must be executable to run; 0755 grants no write +semgrep:python.lang.security.audit.insecure-file-permissions.insecure-file-permissions:fablib/installer.py:d10b35a2f4b7 RevertibleScript writes a script that must be executable; 0755 grants no write +semgrep:python.lang.security.insecure-hash-algorithms-md5.insecure-hash-algorithm-md5:fablib/annotate.py:804854d3f4b1 md5 keys a dict of comments while annotating a plan, not a security digest +semgrep:python.lang.security.insecure-hash-algorithms-md5.insecure-hash-algorithm-md5:fablib/installer.py:65a598eb8621 the MD5sum field of a local build-time Packages index, written beside SHA256, which apt verifies +shellcheck:SC2034:share/initctl.dummy:643b2d76d880 shell lint, not a security risk: a variable read by a sourcing script or left unused +shellcheck:SC2034:share/initctl.dummy:e9d8ec72bc58 shell lint, not a security risk: a variable read by a sourcing script or left unused +shellcheck:SC2046:share/initctl.dummy:964e4d091e7d shell lint, not a security risk: unquoted command substitution over values the script itself produces +shellcheck:SC2166:share/initctl.dummy:8e802790ac73 shell lint, not a security risk: -a/-o in test +shellcheck:SC2166:share/initctl.dummy:d03c108e3f50 shell lint, not a security risk: -a/-o in test diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml new file mode 100644 index 0000000..7545dff --- /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: [master] + workflow_dispatch: +permissions: + contents: read +jobs: + security: + uses: keel-linux/.github/.github/workflows/security-scan.yml@main + permissions: + contents: read + security-events: write