Skip to content

ci: add SAST workflows (semgrep + bandit) with dep-pinned installs#5451

Open
louiseschmidtgen wants to merge 1 commit intomasterfrom
KU-5612/sast-workflows
Open

ci: add SAST workflows (semgrep + bandit) with dep-pinned installs#5451
louiseschmidtgen wants to merge 1 commit intomasterfrom
KU-5612/sast-workflows

Conversation

@louiseschmidtgen
Copy link
Copy Markdown
Contributor

Summary

Add static application security testing (SAST) workflows with hash-pinned pip dependencies, per the security team's recommendation that every repository implement SAST scanning.

Changes

Semgrep SAST workflow (.github/workflows/semgrep.yaml)

  • Runs p/python and p/github-actions rulesets on push/PR
  • Advisory-only: results uploaded to GitHub Security tab via SARIF

Bandit security scan (.github/workflows/bandit.yaml)

  • Scans Python code for common security anti-patterns
  • Blocks on HIGH severity only (-lll flag)
  • Runs on push/PR and weekly (Monday 09:00 UTC)

Dependency pinning (ci/requirements-*.{in,txt})

  • Pin semgrep and bandit pip installs with hash verification
  • Satisfies OSSF Scorecard Pinned-Dependencies checks for pip

Reference

@github-advanced-security
Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants