Skip to content

track: add security/sast-scan to branch protection required checks #284

Description

@mvillmow

Context

PR #264 added the security-sast-scan CI job to .github/workflows/_required.yml as part of issue #157. The job runs Bandit (medium+ severity) as a required check alongside security/dependency-scan and security/secrets-scan.

However, the repo's branch ruleset (homeric-main-baseline, id 15556487) does not yet list security/sast-scan as a required status check. Without this, PRs with SAST findings can merge unblocked.

Confirmed via:

gh api repos/HomericIntelligence/ProjectTelemachy/rulesets/15556487 \
  --jq '[.rules[] | select(.type=="required_status_checks") | .parameters.required_status_checks[].context]'
# Returns: ["lint","unit-tests","integration-tests","security/dependency-scan","security/secrets-scan","build","schema-validation","deps/version-sync"]
# Missing: "security/sast-scan"

Fix

An admin must add security/sast-scan to the ruleset's required status checks. The sibling security checks use integration_id: 15368 (GitHub Actions app).

# Fetch current ruleset to edit
gh api repos/HomericIntelligence/ProjectTelemachy/rulesets/15556487 > /tmp/ruleset.json

# Add the new check to required_status_checks array in the rules[].parameters block,
# then PATCH:
gh api -X PUT repos/HomericIntelligence/ProjectTelemachy/rulesets/15556487 \
  --input /tmp/ruleset-updated.json

The updated required_status_checks array should include:

{"context": "security/sast-scan", "integration_id": 15368}

alongside the existing security/dependency-scan and security/secrets-scan entries.

Why now

Without this, security-sast-scan is advisory only — a PR author can ignore a red SAST gate and merge. The goal of issue #157 was to make SAST a merge gate, not an informational check.

Part of #92, closes the remaining enforcement gap from #157.

Metadata

Metadata

Assignees

No one assigned

    Labels

    securitySecurity findingstate:plan-goPlan approved by reviewer; implementer may proceed.state:skip

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions