ci: security-scan.yml, secret-free security scanning for every repository #21

Merged
marcos-mendez merged 1 commit from ci/security-scan into main 2026-10-07 15:20:00 -03:00
marcos-mendez commented 2026-10-07 14:37:45 -03:00 (Migrated from github.com)

Adds the reusable security-scan.yml and a caller for this repository.

  • gitleaks (pinned binary, version + SHA-256, --redact): the PR's commits on pull_request, the full history on push to main / manual run. A repo's .github/gitleaks.toml allowlists its fixtures; .github/.gitleaksignore takes single false positives.
  • bandit (Python, medium and above), semgrep (pinned CLI, p/python, r/bash, p/secrets + language packs, no account/token), shellcheck (warning+, skipped when the repo already runs it). Each fails only on findings outside the repo's .github/security-baseline, where every entry needs a one-line justification. Logic is bin/security-baseline, tested in tests/security-baseline.bats.
  • Hosted ubuntu-latest only; the keel-lxc runner group (restricted to lxc-trixie.yml and test-appliance.yml) is unchanged. No secrets, pull_request only, persist-credentials: false. Scanners have contents: read; only the upload job has security-events: write, and it runs only on public repos and not for fork PRs.
  • Docs in profile/WORKFLOWS.md. Not a required check.

Merge this before the per-repository security.yml callers, which reference @main.

  • The per-repo files live under .github/, which ships nothing, so require-changelog exempts them.
Adds the reusable `security-scan.yml` and a caller for this repository. - **gitleaks** (pinned binary, version + SHA-256, `--redact`): the PR's commits on `pull_request`, the full history on push to `main` / manual run. A repo's `.github/gitleaks.toml` allowlists its fixtures; `.github/.gitleaksignore` takes single false positives. - **bandit** (Python, medium and above), **semgrep** (pinned CLI, `p/python`, `r/bash`, `p/secrets` + language packs, no account/token), **shellcheck** (warning+, skipped when the repo already runs it). Each fails only on findings outside the repo's `.github/security-baseline`, where every entry needs a one-line justification. Logic is `bin/security-baseline`, tested in `tests/security-baseline.bats`. - Hosted `ubuntu-latest` only; the keel-lxc runner group (restricted to `lxc-trixie.yml` and `test-appliance.yml`) is unchanged. No secrets, `pull_request` only, `persist-credentials: false`. Scanners have `contents: read`; only the `upload` job has `security-events: write`, and it runs only on public repos and not for fork PRs. - Docs in `profile/WORKFLOWS.md`. Not a required check. Merge this before the per-repository `security.yml` callers, which reference `@main`. - The per-repo files live under `.github/`, which ships nothing, so `require-changelog` exempts them.
github-advanced-security[bot] commented 2026-10-07 14:38:24 -03:00 (Migrated from github.com)

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. ### What Enabling Code Scanning Means: - The 'Security' tab will display more code scanning analysis results (e.g., for the default branch). - Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. - You will be able to see the analysis results for the pull request's branch on this [overview](/Keel-Linux/.github/security/code-scanning?query=pr%3A21+is%3Aopen) once the scans have completed and the checks have passed. For more information about GitHub Code Scanning, check out [the documentation](https://docs.github.com/code-security/code-scanning/introduction-to-code-scanning/about-code-scanning).
Sign in to join this conversation.
No description provided.