Skip to content

Compliance: sonar-s7637-exemption-missing #943

Closed

Description

@don-petry

Compliance Finding

Category: ci-workflows
Severity: warning
Check: sonar-s7637-exemption-missing

Detail

sonar-project.properties has no sonar.issue.ignore for githubactions:S7637. SonarCloud will flag first-party reusable-ref caller stubs (@<name>/stable, @v1/@v2) as unpinned actions even though the org exempts them from SHA-pinning. Add the canonical per-stub exemption.

Standard Reference

standards/ci-standards.md#sonarcloud-exemption-first-party-reusable-ref-s7637

Remediation

Copy the relevant workflow template from standards/workflows/ verbatim — do not generate from scratch:

gh api repos/petry-projects/.github/contents/standards/workflows/<template>.yml --jq '.content' | base64 -d > .github/workflows/<template>.yml

Available templates: agent-shield.yml, dev-lead.yml, dependabot-automerge.yml, dependabot-rebase.yml, dependency-audit.yml, feature-ideation.yml


This issue was automatically created by the weekly compliance audit.

Activity

  1. don-petry commented on Jun 26, 2026

    @don-petry
    CollaboratorAuthor

    Dev-Lead Implementation Plan

    Issue: #943 — Compliance: sonar-s7637-exemption-missing

    Scope

    Add the canonical per-stub githubactions:S7637 sonar.issue.ignore exemption to the root sonar-project.properties, scoped to the first-party reusable-ref caller stubs this repo actually carries.

    Caller stubs present in this repo (8 of the 10 canonical)

    agent-shield.yml, pr-review-mention.yml, auto-rebase.yml, dependabot-automerge.yml, dependency-audit.yml, feature-ideation.yml, add-to-project.yml, dev-lead.yml — each confirmed to carry a petry-projects/.github(-private) reusable uses: ref pinned to a moving channel/tag. (pr-auto-review.yml and dependabot-rebase.yml are absent and are omitted, per the standard.)

    Implementation Checklist

    • tests/test_sonar_s7637_exemption.sh — new regression test (TDD, written first)
    • sonar-project.properties — add canonical sonar.issue.ignore.multicriteria block (verbatim from the org .github repo, omitting absent stubs)
    • .github/workflows/test.yml — register the new test step

    Tests to Write

    • Assert an S7637 exemption exists (githubactions:S7637)
    • Assert each present caller stub has its own per-file criterion with resourceKey=**/<stub>.yml
    • Assert no forbidden blanket resourceKey (e.g. **/.github/workflows/*.yml, *.yml, **) is used
    • Assert no criterion is declared for an absent/non-stub file

    Test Command

    bash tests/test_sonar_s7637_exemption.sh (full suite: the test.yml steps + bash .dev-lead/scripts/dev-lead-lint.sh)

  2. don-petry commented on Jun 26, 2026

    @don-petry
    CollaboratorAuthor

    Dev-Lead: Implementation Complete

    Plan Execution

    • Added the canonical per-stub githubactions:S7637 sonar.issue.ignore exemption to root sonar-project.properties, scoped to the 8 first-party reusable-ref caller stubs this repo carries
    • Wrote tests/test_sonar_s7637_exemption.sh (TDD: red before implementation) and registered it in .github/workflows/test.yml
    • Verified test catches all three violation classes (blanket resourceKey, missing present-stub exemption, stale exemption for an absent stub)
    • Full test suite + dev-lead-lint.sh (shellcheck + agent-profile validation) all green

    Stub selection

    Canonical standard lists 10 caller stubs. This repo carries 8 of them — exempted: agent-shield.yml, pr-review-mention.yml, auto-rebase.yml, dependabot-automerge.yml, dependency-audit.yml, feature-ideation.yml, add-to-project.yml, dev-lead.yml. Omitted (not present, per standard): pr-auto-review.yml, dependabot-rebase.yml. Each present stub was confirmed to carry a petry-projects/.github(-private) reusable uses: ref on a moving channel tag. No blanket resourceKey is used, so ci.yml/sonarcloud.yml and third-party actions keep full SHA-pin enforcement.

    Test Results

    test_copilot_chat.sh:              PASS
    test_list_prs_sort.sh:             PASS
    test_sonarcloud_workflow.sh:       PASS
    test_sonar_s7637_exemption.sh:     PASS
    test_copilot_setup_steps.sh:       PASS
    
    dev-lead-lint.sh: shellcheck on 79 file(s)... 4 agent profile(s)... CODEOWNERS... all checks passed
    PASS: sonar-project.properties scopes githubactions:S7637 exemption per present first-party caller stub (8 stubs)
    

    Files Changed

    • sonar-project.properties: added canonical sonar.issue.ignore.multicriteria S7637 block (one per-file criterion per present caller stub)
    • tests/test_sonar_s7637_exemption.sh: new regression guard asserting the exemption exists, is per-file scoped, uses no blanket resourceKey, and has no stale/non-canonical entries
    • .github/workflows/test.yml: registered the new test step

    Notes

  3. added a commit that references this issue on Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    compliance-auditAutomated compliance audit findingdev-leadFor dev-lead agent pickup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions