Skip to content

feat: implement issue #623 — SonarCloud: GitHub Actions / dependency hardening - #723

Merged
don-petry merged 12 commits into
mainfrom
dev-lead/issue-623-20260714-1818
Jul 15, 2026
Merged

feat: implement issue #623 — SonarCloud: GitHub Actions / dependency hardening#723
don-petry merged 12 commits into
mainfrom
dev-lead/issue-623-20260714-1818

Conversation

@don-petry

Copy link
Copy Markdown
Contributor

Closes #623

Implemented by dev-lead agent. Please review.

Copilot AI review requested due to automatic review settings July 14, 2026 18:34
@don-petry
don-petry requested a review from a team as a code owner July 14, 2026 18:34
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@don-petry, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 18 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: abf436f0-fcc5-4284-ac1a-0a694f4d2963

📥 Commits

Reviewing files that changed from the base of the PR and between bc1c4cc and 110686d.

📒 Files selected for processing (12)
  • .github/workflows/agent-shield-reusable.yml
  • .github/workflows/ci.yml
  • .github/workflows/dependency-audit-reusable.yml
  • .github/workflows/dependency-audit.yml
  • .github/workflows/dependency-hardening-tests.yml
  • .github/workflows/feature-ideation-reusable.yml
  • .github/workflows/feature-ideation-tests.yml
  • scripts/ci-yamllint-requirements.txt
  • scripts/feature-ideation-requirements.txt
  • scripts/feature-ideation-tests-requirements.txt
  • scripts/pip-audit-requirements.txt
  • test/workflows/dependency-hardening.bats
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev-lead/issue-623-20260714-1818

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) July 14, 2026 18:35
@don-petry
don-petry disabled auto-merge July 14, 2026 18:36

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces several version- and hash-locked Python requirements files along with a BATS test suite (test/workflows/dependency-hardening.bats) to enforce dependency hardening policies in GitHub Actions workflows. The review feedback focuses on improving the robustness of the Bash-based test scripts, specifically suggesting the use of 'while read -r ... || [ -n "$var" ]' to correctly process lines lacking trailing newlines, stripping carriage returns to handle CRLF line endings, declaring variables locally, checking file existence, and properly stripping both leading and trailing quotes from parsed requirements file paths.

Comment thread test/workflows/dependency-hardening.bats
Comment thread test/workflows/dependency-hardening.bats
Comment thread test/workflows/dependency-hardening.bats
Comment thread test/workflows/dependency-hardening.bats

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Resolves SonarCloud GitHub Actions dependency-hardening findings from issue #623 by making Python and Node CLI installs deterministic and guarded by regression tests, without changing intended workflow behavior.

Changes:

  • Replaced ad-hoc pip install ... usage in workflows with --require-hashes --only-binary :all: installs from generated, hash-locked requirements files.
  • Hardened npx usage in workflows by adding --ignore-scripts and introduced a Bats-based regression guard to prevent future drift.
  • Added a dedicated GitHub Actions workflow to run the dependency-hardening regression tests on workflow/requirements changes.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/workflows/dependency-hardening.bats Adds a Bats guard to enforce hardened pip install / npx patterns across workflows.
scripts/pip-audit-requirements.txt Introduces a hash-locked requirements set for installing pip-audit deterministically.
scripts/feature-ideation-tests-requirements.txt Adds hash-locked dependencies for the feature-ideation tests workflow.
scripts/feature-ideation-requirements.txt Adds hash-locked dependencies for the feature-ideation reusable workflow tooling.
scripts/ci-yamllint-requirements.txt Adds hash-locked dependencies for the CI yamllint step.
.github/workflows/feature-ideation-tests.yml Switches to hash-/binary-locked pip install via requirements file.
.github/workflows/feature-ideation-reusable.yml Switches to hash-/binary-locked pip install for checked-out tooling.
.github/workflows/dependency-hardening-tests.yml Adds CI coverage to execute the dependency-hardening Bats guard.
.github/workflows/dependency-audit.yml Switches pip-audit installation to hash-/binary-locked requirements.
.github/workflows/dependency-audit-reusable.yml Switches reusable pip-audit installation to hash-/binary-locked requirements.
.github/workflows/ci.yml Hash-locks yamllint install and adds --ignore-scripts to npx invocation.
.github/workflows/agent-shield-reusable.yml Adds --ignore-scripts to npx invocation for AgentShield.

Comment thread .github/workflows/ci.yml
Comment thread scripts/pip-audit-requirements.txt Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 14, 2026
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-bot-comment (applied)

Changes committed and pushed.

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) July 14, 2026 18:40
@don-petry
don-petry disabled auto-merge July 14, 2026 18:41
@don-petry
don-petry enabled auto-merge (squash) July 14, 2026 18:45
@don-petry
don-petry disabled auto-merge July 14, 2026 18:45
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
Issues addressed: 0
Files changed: None required
Skipped (informational): 0
Status: No actionable issues. Quality Gate passed with zero new issues, 
accepted issues, or security hotspots. All CI checks successful. No action required.
```

@don-petry
don-petry enabled auto-merge (squash) July 14, 2026 18:46

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: 1283cc5655387db493cde896d82d7e2fa2d02ee6
Review mode: triage-approved (single reviewer)

Summary

Resolves all 13 SonarCloud GitHub Actions dependency-hardening findings from issue #623. Workflow pip installs are now version- and hash-locked (--require-hashes --only-binary :all: with pip-compile-generated requirements files), npx invocations are version-pinned and run with --ignore-scripts, and a new bats regression guard plus CI workflow prevent future drift. No behavior change intended; SonarCloud Quality Gate passed with 0 new issues.

Linked issue analysis

Issue #623 lists 13 findings across 5 rules (S8541, S8543, S8544, S8545 for pip; S6505 for npx) in 6 workflow files. Every affected file is modified in this PR with the exact mitigations SonarCloud checks for. Acceptance criteria are met: real fixes (no NOSONAR), CI green, and SonarCloud reports 0 new issues and 0 security hotspots on this PR. A regression test suite (test/workflows/dependency-hardening.bats) enforces the hardened patterns going forward.

Findings

  • Triage assessment confirmed: changes are strictly security-hardening with no behavior change.
  • New workflow dependency-hardening-tests.yml follows least privilege (top-level permissions: {}, job-level contents: read) and pins actions/checkout to a SHA verified via the GitHub API to match the v7.0.0 tag.
  • Requirements files contain only exact pins with sha256 hashes; no custom index URLs or suspicious directives.
  • The one unresolved Copilot thread (unpinned ecc-agentshield in ci.yml) was fixed in commit 41a06e4 (now pinned to @1.4.0) with a confirming reply; the current head reflects the fix. All gemini-code-assist threads on the bats file are resolved and the suggestions are incorporated.
  • run_secret_scanning MCP tool unavailable in this environment; gitleaks CI check passed and no secret-like content is present in the diff.
  • No blocking issues found.

CI status

All checks green at head 1283cc5: CI (Lint, ShellCheck, Agent Security Scan, gitleaks), CodeQL, SonarCloud Quality Gate (0 new issues), Dependency Hardening Tests (bats), Feature Ideation Tests, AgentShield, Dependency audit, CodeRabbit. Two CANCELLED dev-lead agent dispatch runs are superseded duplicates (a later run of the same workflow succeeded) and are non-blocking.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@don-petry
don-petry disabled auto-merge July 14, 2026 21:52
@don-petry
don-petry enabled auto-merge (squash) July 14, 2026 21:59
@don-petry
don-petry disabled auto-merge July 14, 2026 23:11
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #723
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-07-14T23:43:39Z

@don-petry
don-petry enabled auto-merge (squash) July 14, 2026 23:13
@don-petry
don-petry disabled auto-merge July 14, 2026 23:22
@don-petry
don-petry enabled auto-merge (squash) July 14, 2026 23:27
@don-petry
don-petry disabled auto-merge July 14, 2026 23:28
@don-petry
don-petry enabled auto-merge (squash) July 14, 2026 23:35
@don-petry
don-petry disabled auto-merge July 14, 2026 23:35
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
**Tier 1 Blockers:**
- CI checks: All "success" or "skipped" — no failures
- Reviews: No "CHANGES_REQUESTED" — only APPROVED and COMMENTED
- ✅ **Zero Tier 1 blockers**
---
## Summary
**Bot:** SonarCloud  
**Issues addressed:** 0  
**No changes needed** — Quality Gate passed with 0 new issues and 0 security hotspots. All CI checks passing, no open review blockers.
The PR is ready to merge. ✓

@don-petry
don-petry enabled auto-merge (squash) July 14, 2026 23:36
@don-petry
don-petry disabled auto-merge July 15, 2026 02:48
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #723
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-07-15T03:26:49Z

@don-petry

Copy link
Copy Markdown
Contributor Author

Note

@don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically.
Next attempt after: 2026-07-15T03:26:49Z

@don-petry
don-petry enabled auto-merge (squash) July 15, 2026 02:56
@don-petry
don-petry disabled auto-merge July 15, 2026 03:13
@sonarqubecloud

Copy link
Copy Markdown

@don-petry
don-petry enabled auto-merge (squash) July 15, 2026 03:15
@don-petry
don-petry disabled auto-merge July 15, 2026 03:16
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
**Tier 1 Blockers:** None
- All CI checks: `success` or `skipped` (no failures, timeouts, or action_required)
- All reviews: `APPROVED` or `COMMENTED` (no `CHANGES_REQUESTED`)
**Other Reviews:**
- `coderabbitai[bot]` (APPROVED): No issues flagged
- `copilot-pull-request-reviewer[bot]` (COMMENTED): Summary/overview only, no change requests
- `gemini-code-assist[bot]` (COMMENTED): Code review suggestions, but review state is COMMENTED (informational), not CHANGES_REQUESTED
- `donpetry-bot` (APPROVED): Detailed automated review confirming all fixes are correct, SonarCloud Quality Gate passed
## Conclusion
**No changes needed.** The SonarCloud Quality Gate has passed with zero new issues and zero security hotspots. All CI checks pass. No blocking reviews exist. The PR is clean from a quality and security perspective.

@don-petry
don-petry enabled auto-merge (squash) July 15, 2026 03:16
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@don-petry
don-petry disabled auto-merge July 15, 2026 03:17
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
Issues addressed: 1
- Unpinned ecc-agentshield in ci.yml: verified pinned to @1.4.0 on line 104 [replied + thread resolved]
  - The Copilot thread has been closed; all other review threads (Gemini) are already resolved
Files changed: none (fix was already applied in HEAD)
Skipped (informational): 0
Tier 1 blockers: 0
CI status: all green (21 checks passed)
```
The PR is ready. The bot's quota-limit message is a service notification, not a code issue. The single open review thread (Copilot's point about unpinned ecc-agentshield) was already fixed at HEAD and has now been resolved. All other threads from code reviewers are resolved or marked outdated.

@don-petry
don-petry merged commit 3f7d970 into main Jul 15, 2026
25 of 29 checks passed
@don-petry
don-petry deleted the dev-lead/issue-623-20260714-1818 branch July 15, 2026 03:18

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: 110686d5d285a5dea368da0fb13980faeb2ebb8c
Review mode: triage-approved (single reviewer)

Summary

Confirmation review (triage-approved). PR resolves all 13 SonarCloud GitHub Actions dependency-hardening findings from issue #623: every workflow pip install is now hash- and binary-locked via pip-compile-generated requirements files, and every npx invocation is version-pinned and runs with --ignore-scripts. A new bats regression suite and a least-privilege test workflow (permissions: {}, SHA-pinned checkout verified as v7.0.0 via the GitHub API) guard against reintroduction. Triage assessment confirmed correct.

Linked issue analysis

Issue #623 (SonarCloud: GitHub Actions / dependency hardening, 13 findings across S8541/S8543/S8544/S8545/S6505) is substantively addressed: all 6 affected workflow files are hardened, SonarCloud Quality Gate passed with 0 new issues, and the issue auto-closed. Acceptance criteria met: findings resolved, no behavior change (same tool versions, e.g. pip-audit==2.9.0 and yamllint==1.35.1), CI green, no NOSONAR suppressions.

Findings

No blocking findings.

  • Hash-locked requirements files contain only public PyPI packages with sha256 hashes; no secrets in the diff (gitleaks CI check passed; run_secret_scanning MCP tool unavailable in this environment).
  • All 6 prior review threads (Gemini, Copilot) are resolved; the Copilot concern about pip itself appearing in pip-audit-requirements.txt was addressed — no pip== entry remains.
  • New dependency-hardening-tests.yml follows org standards: top-level permissions: {}, job-level contents: read, timeout, concurrency group, and actions/checkout pinned to 9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 (verified equal to the v7.0.0 tag via the GitHub API).
  • Bats guard is heuristic (line-based) but fails loud and errs toward false positives, which is appropriate for a regression tripwire.

CI status

All code checks green at 110686d: Lint, bats (incl. new dependency-hardening suite), ShellCheck, CodeQL, SonarCloud (Quality Gate passed, 0 new issues), Secret scan (gitleaks), Agent Security Scan, AgentShield, npm audit. Skipped ecosystem audits (pip/pnpm/cargo/go) are expected. Two cancelled dev-lead orchestration runs (dispatch/ci-relay) were superseded by concurrency and are not code-quality gates; a successful dev-lead dispatch run exists for the same SHA.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

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.

SonarCloud: GitHub Actions / dependency hardening

3 participants