Skip to content

Compliance: sonar-s7637-exemption-missing #350

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
    ContributorAuthor

    Dev-Lead Implementation Plan

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

    Scope

    Add the canonical per-stub githubactions:S7637 SonarCloud exemption block to sonar-project.properties, scoped to each first-party reusable-ref caller-stub workflow that exists in this repo (no blanket resourceKey).

    Implementation Checklist

    • Append the canonical S7637 exemption block (comment + sonar.issue.ignore.multicriteria list + one ruleKey/resourceKey pair per stub) to sonar-project.properties, copied verbatim from petry-projects/.github
    • Confirm all 10 listed caller stubs exist in .github/workflows/ (agent-shield, pr-review-mention, pr-auto-review, auto-rebase, dependabot-rebase, dependabot-automerge, dependency-audit, feature-ideation, add-to-project, dev-lead) — all present, so full block applies
    • Preserve existing sonar-project.properties keys (projectName, sources, exclusions)

    Tests to Write

    • None — pure configuration change with no observable runtime behavior. Verification is by properties syntax validity and matching the canonical block per the standard. (Phase 2 TDD exemption: config-only change.)

    Test Command

    pnpm -r run test (repo test runner; no test covers this config file)

  2. don-petry commented on Jun 26, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead: Implementation Complete

    Plan Execution

    • Appended the canonical githubactions:S7637 exemption block to sonar-project.properties, copied verbatim from petry-projects/.github
    • Confirmed all 10 listed first-party caller stubs exist in .github/workflows/ — so the full canonical block applies with no omissions and no blanket resourceKey
    • Preserved existing sonar-project.properties keys (projectKey, organization, projectName, sources, exclusions)

    Test Results

    Config-only change — no automated tests cover sonar-project.properties (Phase 2 TDD exemption applies). Verification performed:

    $ bash .dev-lead/scripts/dev-lead-lint.sh
      [lint] shellcheck on 2 file(s)...
      [lint] validating CODEOWNERS...
    OK: CODEOWNERS
      [lint] all checks passed
    EXIT=0
    
    Stub-existence check (every criterion maps to a real workflow file):
    exists: agent-shield.yml, pr-review-mention.yml, pr-auto-review.yml, auto-rebase.yml,
            dependabot-rebase.yml, dependabot-automerge.yml, dependency-audit.yml,
            feature-ideation.yml, add-to-project.yml, dev-lead.yml
    
    Repo JS/TS test suite (`pnpm -r run test`): pnpm not installed and no test
    packages present yet — nothing to run. prettier `format:check` does not match
    `.properties` files.
    

    Files Changed

    • sonar-project.properties: added the per-stub S7637 SonarCloud exemption — explanatory comment, the sonar.issue.ignore.multicriteria list, and one ruleKey/resourceKey pair per first-party caller stub. Existing keys unchanged.

    Notes

    • All 10 caller stubs named in the standard exist in this repo, so the canonical block was copied verbatim with no criteria omitted.
    • Each resourceKey is scoped to an individual stub file (**/<stub>.yml); no blanket workflow-path key is used, so ci.yml / sonarcloud.yml and any third-party uses: keep full SHA-pin enforcement (avoids the sonar-s7637-exemption-too-broad error).
    • feature-ideation.yml is currently SHA-pinned and pr-auto-review.yml uses @v2; the standard scopes the exemption by stub-file presence, and a non-firing criterion is harmless, so both are included per the canonical block.
    • No follow-up issues.
  3. added
    dev-leadFor dev-lead agent pickup
    and removed
    dev-leadFor dev-lead agent pickup
    on Jul 2, 2026
  4. don-petry commented on Jul 2, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead Implementation Plan

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

    Scope

    Investigate the githubactions:S7637 exemption state and, if a gap exists, apply the canonical inline # NOSONAR(githubactions:S7637) marker (or legacy per-stub sonar-project.properties exemption) to every channel-pinned first-party caller stub.

    Investigation Checklist

    • Read org ci-standards.md#sonarcloud-exemption-first-party-reusable-ref-s7637
    • Read org scripts/compliance-audit.sh → check_sonar_s7637_exemption to determine the exact compliance condition
    • Enumerate every uses: petry-projects/.github(-private)/… caller stub in .github/workflows/
    • Confirm which stubs are channel-pinned (@<name>/stable, @v1/@v2) vs SHA-pinned
    • Verify each channel-pinned stub carries the inline # NOSONAR(githubactions:S7637) marker

    Remediation (only if a gap is found)

    Tests

    No repo unit-test hooks cover CI workflow YAML; verification is the org compliance-audit condition itself (marker presence on every channel-pinned first-party stub). Repo lint: bash .dev-lead/scripts/dev-lead-lint.sh.

  5. don-petry commented on Jul 2, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead: Implementation Complete — No Code Change Required (Already Remediated)

    Finding

    The repo already satisfies the githubactions:S7637 exemption via the canonical inline-marker mechanism (#549). Commit 71c3ba0 ("ci: inline NOSONAR(S7637) markers on first-party caller stubs (#549 canonical migration) (#359)") — which is the current HEAD of this branch — added the inline # NOSONAR(githubactions:S7637) marker to every channel-pinned first-party caller stub. This issue was filed by an audit run that predates that migration.

    Verification Against the Org Audit

    Per petry-projects/.github scripts/compliance-audit.sh → check_sonar_s7637_exemption, a SonarCloud-gated repo is compliant when every channel-pinned first-party caller stub carries the inline marker (inline_seen=1 && inline_missing=0 → return 0). The standard (ci-standards.md#sonarcloud-exemption-first-party-reusable-ref-s7637) confirms the inline marker is canonical and requires zero per-repo sonar-project.properties entries.

    All 10 channel-pinned first-party uses: lines carry the marker:

    add-to-project.yml        @add-to-project/stable        ✓ marker
    agent-shield.yml          @agent-shield/stable          ✓ marker
    auto-rebase.yml           @auto-rebase/stable           ✓ marker
    dependabot-automerge.yml  @dependabot-automerge/stable  ✓ marker
    dependabot-rebase.yml     @dependabot-rebase/stable     ✓ marker
    dependency-audit.yml      @dependency-audit/stable      ✓ marker
    dev-lead.yml              @dev-lead/stable              ✓ marker
    pr-auto-review.yml        @v2                           ✓ marker
    pr-review.yml             @pr-review/stable             ✓ marker
    pr-review-mention.yml     @pr-review-mention/stable     ✓ marker
    

    The 2 SHA-pinned first-party refs correctly carry no marker (a 40-char SHA already satisfies S7637):

    feature-ideation.yml      @c2beceb…816 # v1   (SHA-pinned — no marker needed)
    ci-failure-analyst.yml    @857bb18…4e  # main (SHA-pinned — no marker needed)
    

    Adding legacy sonar.issue.ignore entries to sonar-project.properties would be redundant and is explicitly "no longer required once the stubs carry the inline marker" per the standard, so no such entries were added.

    Test Results

    No repo unit-test hooks cover CI workflow YAML (behavior-preserving config; Phase-2 TDD exception applies). Verification is the org audit condition above. Required repo lint passed:

      [lint] shellcheck on 2 file(s)...
      [lint] validating CODEOWNERS...
    OK: CODEOWNERS
      [lint] all checks passed
    

    Files Changed

    • None. Working tree is clean (git status empty); the exemption was already applied by 71c3ba0.

    Notes

    This is a stale compliance finding — already remediated by the #549 canonical migration before this issue was picked up. No PR content is produced because there is nothing to change. The next compliance-audit run will not re-file it.

  6. added
    dev-leadFor dev-lead agent pickup
    and removed
    dev-leadFor dev-lead agent pickup
    on Jul 2, 2026
  7. don-petry commented on Jul 2, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead: issue #350 implementation failed — will retry

    The engine failed (engine-error — e.g. a timeout or transient engine error). This was attempt 1 of 3; dev-lead will retry automatically. You can also re-apply the dev-lead label to retry now.

    Last 40 lines of engine output (redacted)
        [copilot] calling gh copilot (model=openai/o4-mini, timeout=600s, flags=--yolo)
    Error: Model "openai/o4-mini" from --model flag is not available.
    
    
  8. don-petry commented on Jul 2, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead: issue #350 implementation failed — will retry

    The engine failed (engine-error — e.g. a timeout or transient engine error). This was attempt 2 of 3; dev-lead will retry automatically. You can also re-apply the dev-lead label to retry now.

    Last 40 lines of engine output (redacted)
        [copilot] calling gh copilot (model=openai/o4-mini, timeout=600s, flags=--yolo)
    Error: Model "openai/o4-mini" from --model flag is not available.
    
    
  9. added
    dev-leadFor dev-lead agent pickup
    and removed
    dev-leadFor dev-lead agent pickup
    on Jul 2, 2026
  10. don-petry commented on Jul 2, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead: Implementation Complete — No Changes Required (finding already remediated)

    Summary

    This sonar-s7637-exemption-missing finding is already resolved by the canonical inline-marker migration in commit 71c3ba0 (PR #359, "ci: inline NOSONAR(S7637) markers on first-party caller stubs — #549 canonical migration", merged 2026-06-30). No source changes are needed, and none were made.

    Why no sonar-project.properties entry is added

    Per ci-standards.md#sonarcloud-exemption-first-party-reusable-ref-s7637, the canonical mechanism is an inline # NOSONAR(githubactions:S7637) marker on each channel-pinned first-party uses: line. Once every stub carries it, zero per-repo sonar-project.properties entries are required. The legacy per-file properties exemption is explicitly "optional / transitional," and a blanket resourceKey is forbidden (it would file the sonar-s7637-exemption-too-broad error by also dropping S7637 on ci.yml/sonarcloud.yml). Adding a properties exemption now would be redundant and against the standard.

    Verification (audit logic replicated locally)

    I replicated check_sonar_s7637_exemption / classify_inline_s7637_marker from petry-projects/.github scripts/compliance-audit.sh against every workflow file. Every channel-pinned first-party caller stub carries the marker; the two SHA-pinned first-party refs correctly carry none:

    OK (channel-pinned + marker): add-to-project.yml       ref=add-to-project/stable
    OK (channel-pinned + marker): agent-shield.yml         ref=agent-shield/stable
    OK (channel-pinned + marker): auto-rebase.yml          ref=auto-rebase/stable
    OK (channel-pinned + marker): dependabot-automerge.yml ref=dependabot-automerge/stable
    OK (channel-pinned + marker): dependabot-rebase.yml    ref=dependabot-rebase/stable
    OK (channel-pinned + marker): dependency-audit.yml     ref=dependency-audit/stable
    OK (channel-pinned + marker): dev-lead.yml             ref=dev-lead/stable
    OK (channel-pinned + marker): pr-auto-review.yml       ref=v2
    OK (channel-pinned + marker): pr-review-mention.yml    ref=pr-review-mention/stable
    OK (channel-pinned + marker): pr-review.yml            ref=pr-review/stable
    inline_seen=1 inline_missing=0
    VERDICT: COMPLIANT (canonical inline-marker mechanism satisfied)
    

    SHA-pinned (no marker needed, correctly none): feature-ideation.yml@c2beceb…, ci-failure-analyst.yml@857bb18….

    Given inline_seen=1 and inline_missing=0, check_sonar_s7637_exemption returns compliant (early return 0) and files no finding. The original audit run predated 71c3ba0 landing.

    Lint

    bash .dev-lead/scripts/dev-lead-lint.sh → all checks passed (exit 0).

    Files Changed

    • None. The remediation is already present in .github/workflows/*.yml as of 71c3ba0.

    Notes

    • No tests were added (Phase 2 exception: no source/behavior change — the finding is stale/already-remediated).
    • Recommend closing this issue as already-resolved. If the weekly audit re-fires against main, it should now classify the repo compliant; a persistent re-file would indicate an audit caching/scan-freshness issue rather than a repo gap.
  11. don-petry commented on Jul 2, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead Implementation Plan

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

    Scope

    Verify the githubactions:S7637 first-party reusable-ref exemption is present, and remediate only if a gap actually exists.

    Investigation Findings (pre-implementation)

    • The canonical mechanism for this exemption (per standards/ci-standards.md#sonarcloud-exemption-first-party-reusable-ref-s7637) is an inline # NOSONAR(githubactions:S7637) marker on each channel-pinned first-party caller-stub uses: line — not a sonar-project.properties entry (which is the legacy/transitional mechanism, explicitly "no longer required once the stubs carry the inline marker").
    • All 10 channel-pinned first-party stubs in .github/workflows/ already carry the inline marker (added by PR ci: inline NOSONAR(S7637) markers on first-party caller stubs (#549 canonical migration) #359, merged 2026-06-30): add-to-project, agent-shield, auto-rebase, dependabot-automerge, dependabot-rebase, dependency-audit, dev-lead, pr-auto-review, pr-review, pr-review-mention.
    • The two SHA-pinned first-party refs (feature-ideation.yml @<sha> # v1, ci-failure-analyst.yml @<sha> # main) already satisfy S7637 and correctly carry no marker.
    • This issue was filed 2026-06-26 — four days BEFORE PR ci: inline NOSONAR(S7637) markers on first-party caller stubs (#549 canonical migration) #359 landed the markers. The finding is stale.

    Verification Method

    Ran the audit's own pure classifiers (classify_inline_s7637_marker, classify_sonar_s7637_exemption) from petry-projects/.github scripts/compliance-audit.sh against the current local workflows. Result: inline_seen=1, inline_missing=0 → check_sonar_s7637_exemption returns 0 (compliant), no finding emitted.

    Implementation Checklist

    • Confirm every channel-pinned first-party stub carries the inline marker
    • Confirm SHA-pinned/third-party refs correctly lack the marker
    • Run canonical classifier to reproduce audit verdict → COMPLIANT
    • No source changes required — adding legacy sonar-project.properties entries would be redundant and is discouraged by the standard

    Tests to Write

    • None — behavior-preserving verification of an already-satisfied config exemption (Phase 2 documentation/config exception applies).

    Test Command

    bash .dev-lead/scripts/dev-lead-lint.sh

  12. don-petry commented on Jul 2, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead: Implementation Complete — No Change Required (finding already remediated)

    Conclusion

    This finding is stale / already remediated. The repo is already compliant with the githubactions:S7637 first-party reusable-ref exemption via the canonical inline-marker mechanism. No source changes are needed, and none were made.

    Why no sonar-project.properties edit

    Per standards/ci-standards.md#sonarcloud-exemption-first-party-reusable-ref-s7637, the canonical exemption is an inline # NOSONAR(githubactions:S7637) marker on each channel-pinned first-party caller-stub uses: line. The sonar-project.properties sonar.issue.ignore approach named in the finding is the legacy/transitional mechanism, which the standard states is "no longer required once the stubs carry the inline marker." Adding it now would be redundant, and a blanket resourceKey is explicitly forbidden.

    Timeline

    Verification (audit's own classifier, run against current repo)

    Extracted classify_inline_s7637_marker + classify_sonar_s7637_exemption from petry-projects/.github scripts/compliance-audit.sh and ran them over .github/workflows/*:

    add-to-project.yml                       present
    agent-shield.yml                         present
    auto-rebase.yml                          present
    ci-failure-analyst.yml                   n/a      (SHA-pinned @<sha> # main)
    ci.yml                                   n/a
    copilot-setup-steps.yml                  n/a
    dependabot-automerge.yml                 present
    dependabot-rebase.yml                    present
    dependency-audit.yml                     present
    dev-lead.yml                             present
    feature-ideation.yml                     n/a      (SHA-pinned @<sha> # v1)
    pr-auto-review.yml                       present
    pr-review-mention.yml                    present
    pr-review.yml                            present
    sonarcloud.yml                           n/a
    stale.yml                                n/a
    terraform.yml                            n/a
    ----
    inline_seen=1 inline_missing=0
    VERDICT: COMPLIANT -> check_sonar_s7637_exemption returns 0 (no finding emitted)
    

    All 10 channel-pinned first-party stubs carry the inline marker; the 2 SHA-pinned first-party refs correctly carry none. check_sonar_s7637_exemption short-circuits to return 0 on inline_seen=1 && inline_missing=0.

    Repo lint

      [lint] shellcheck on 2 file(s)...
      [lint] validating CODEOWNERS...
    OK: CODEOWNERS
      [lint] all checks passed
    

    Files Changed

    • None. git status is clean.

    Notes

  13. added
    dev-leadFor dev-lead agent pickup
    and removed
    dev-leadFor dev-lead agent pickup
    on Jul 2, 2026
  14. don-petry commented on Jul 2, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead Implementation Plan

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

    Scope

    Bring the first-party channel-pinned caller-stub workflows to byte-exact parity with their canonical standards/workflows/ templates, so the canonical inline # NOSONAR(githubactions:S7637) exemption travels with each stub verbatim. No sonar-project.properties change is made — the standard states the inline marker is the canonical mechanism requiring zero properties entries, and forbids a broad resourceKey (which would trigger sonar-s7637-exemption-too-broad).

    Findings from investigation

    • Canonical mechanism per ci-standards.md#sonarcloud-exemption-first-party-reusable-ref-s7637 is an inline NOSONAR marker on each channel-pinned stub, not a properties entry.
    • Commit 71c3ba0 already added the markers, but the stubs drifted from the templates (missing trailing newlines; dev-lead.yml missing the S7637 header-comment block; dependency-audit.yml stale header anchor). Remediation = copy templates verbatim.
    • SHA-pinned first-party refs (feature-ideation.yml @<sha> # v1, ci-failure-analyst.yml @<sha> # main) correctly carry no marker and are out of scope. pr-review.yml (.github-private) has no template and already carries the marker; left untouched.

    Implementation Checklist (re-sync verbatim from standards/workflows/)

    • .github/workflows/add-to-project.yml
    • .github/workflows/agent-shield.yml
    • .github/workflows/auto-rebase.yml
    • .github/workflows/dependabot-automerge.yml
    • .github/workflows/dependabot-rebase.yml
    • .github/workflows/dependency-audit.yml
    • .github/workflows/dev-lead.yml
    • .github/workflows/pr-auto-review.yml
    • .github/workflows/pr-review-mention.yml

    Tests to Write

    • None. This is a CI-config / documentation change with no observable runtime behavior and no in-repo YAML-compliance test harness (Phase 2 exception). Verification is byte-exact diff against canonical templates + dev-lead-lint.sh + YAML parse.

    Test Command

    bash .dev-lead/scripts/dev-lead-lint.sh plus a byte-exact diff of each stub against its canonical template.

  15. don-petry commented on Jul 2, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead: Implementation Complete

    Plan Execution

    • Read AGENTS.md/CLAUDE.md and the canonical ci-standards.md S7637 section
    • Identified the canonical exemption mechanism: an inline # NOSONAR(githubactions:S7637) marker on each channel-pinned first-party caller stub (NOT a sonar-project.properties entry)
    • Re-synced all 9 channel-pinned first-party caller stubs verbatim from standards/workflows/ so the marker travels byte-exact with each stub
    • Verified byte-exact parity with canonical templates, S7637 markers present, YAML validity, and required lint

    Why no sonar-project.properties change

    The finding's "Detail" reflects the legacy mechanism. Per the standard, the inline marker is the canonical exemption and requires zero sonar-project.properties entries; a repo is compliant when every channel-pinned stub carries the marker. Commit 71c3ba0 had already added the markers but the stubs had drifted from the templates (missing trailing newlines; dev-lead.yml missing the S7637 header-comment block; dependency-audit.yml stale doc anchor). The issue's remediation — "copy the template verbatim" — is exactly this re-sync. Adding a legacy properties entry would be redundant, and a blanket resourceKey would trigger the worse sonar-s7637-exemption-too-broad error, so none was added.

    Out of scope (correctly unchanged): SHA-pinned first-party refs feature-ideation.yml (@<sha> # v1) and ci-failure-analyst.yml (@<sha> # main) need no marker; pr-review.yml (.github-private, no template) already carries the marker.

    Test Results

    No unit tests apply. Per the Phase 2 exception, this is a CI-config / documentation re-sync with no observable runtime behavior; the repo has no in-repo YAML-compliance test harness, and .github/workflows/** is excluded from Sonar sources and imported by zero packages/tests (so the JS/TS pnpm -r run test suite cannot exercise it; node_modules is not installed in this environment). Authoritative verification instead:

    Required lint — bash .dev-lead/scripts/dev-lead-lint.sh:
      [lint] shellcheck on 2 file(s)...
      [lint] validating CODEOWNERS...
      OK: CODEOWNERS
      [lint] all checks passed   (exit 0)
    
    Byte-exact parity vs canonical standards/workflows/ templates:
      MATCH: add-to-project.yml       MATCH: dependency-audit.yml
      MATCH: agent-shield.yml         MATCH: dev-lead.yml
      MATCH: auto-rebase.yml          MATCH: pr-auto-review.yml
      MATCH: dependabot-automerge.yml MATCH: pr-review-mention.yml
      MATCH: dependabot-rebase.yml
    
    YAML parse: OK for all 9 stubs
    S7637 marker present on every channel-pinned first-party stub (10 files incl. pr-review.yml)
    

    Files Changed

    • .github/workflows/add-to-project.yml, agent-shield.yml, auto-rebase.yml, dependabot-automerge.yml, dependabot-rebase.yml, pr-auto-review.yml, pr-review-mention.yml: re-synced verbatim (added canonical trailing newline; uses: line + S7637 marker already matched byte-for-byte)
    • .github/workflows/dependency-audit.yml: re-synced verbatim (fixed stale doc-anchor comment #5-…auditym → #7-…audityml; trailing newline)
    • .github/workflows/dev-lead.yml: re-synced verbatim (restored the S7637 explanatory header-comment block documenting the marker; corrected two ci-standards.md → ../ci-standards.md comment refs; trailing newline)

    Notes

    • sonar-project.properties intentionally not modified (see rationale above).
    • SHA-pinned first-party refs and the private-org pr-review.yml intentionally left untouched.
  16. don-petry commented on Jul 3, 2026

    @don-petry
    ContributorAuthor

    Resolved! This check is now passing as of 2026-07-03. Closing automatically.

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