Skip to content

feat(ci): add dependency-audit.yml workflow#148

Closed
don-petry wants to merge 1 commit intomainfrom
claude/issue-104-20260407-1732
Closed

feat(ci): add dependency-audit.yml workflow#148
don-petry wants to merge 1 commit intomainfrom
claude/issue-104-20260407-1732

Conversation

@don-petry
Copy link
Copy Markdown
Collaborator

Summary

  • Adds .github/workflows/dependency-audit.yml to satisfy the compliance requirement
  • Runs npm audit --audit-level=moderate on push/PR to main and weekly on Mondays at 06:00 UTC
  • Follows existing repo patterns: permissions: {} at top level, explicit contents: read at job level, pinned action SHAs with version comments

Test plan

  • Verify CI passes on this PR
  • Confirm dependency-audit.yml appears in the Actions tab after merge

Closes #104

Generated with Claude Code

Adds the required dependency-audit workflow to satisfy the compliance
requirement flagged in issue #104. The workflow runs npm audit on
push/PR to main and weekly on Mondays.

Closes #104

Co-authored-by: don-petry <don-petry@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 7, 2026 17:33
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 7, 2026

Warning

Rate limit exceeded

@don-petry has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 7 minutes and 13 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 7 minutes and 13 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7541de66-063e-4187-91d5-01a6d5b1481a

📥 Commits

Reviewing files that changed from the base of the PR and between 1620841 and cd8123d.

📒 Files selected for processing (1)
  • .github/workflows/dependency-audit.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/issue-104-20260407-1732

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

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 7, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube Cloud

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a GitHub Actions workflow to run npm audit regularly for compliance and security scanning of npm dependencies.

Changes:

  • Introduces .github/workflows/dependency-audit.yml workflow.
  • Runs npm ci + npm audit --audit-level=moderate on push/PR to main and on a weekly cron schedule.

Comment on lines +23 to +26
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

- name: Use Node.js 20
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

The workflow pins actions by SHA (good), but the inline version comments (# v6) are the main human-auditable indicator of provenance and can easily become incorrect/misleading. Please update the comments to the exact release/tag that the pinned SHA comes from (e.g., # vX.Y.Z), or otherwise ensure the stated version matches the pinned commit. This helps reviewers/compliance auditors verify what’s actually running and reduces accidental drift.

Suggested change
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Use Node.js 20
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Use Node.js 20
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f

Copilot uses AI. Check for mistakes.
- name: Use Node.js 20
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
node-version: '20'
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

This workflow will run frequently (push + PR), and npm ci can be a noticeable cost. Consider enabling npm caching via actions/setup-node (with: cache: npm and, if needed, cache-dependency-path) to reduce CI time and load while keeping deterministic installs.

Suggested change
node-version: '20'
node-version: '20'
cache: 'npm'

Copilot uses AI. Check for mistakes.
@don-petry
Copy link
Copy Markdown
Collaborator Author

Closing as stale — predates the standards PR.

This PR was generated by Claude during the original bulk-toggle yesterday, before petry-projects/.github#86 landed. That standards PR added prompt rules that:

  • Require copying from petry-projects/.github/standards/workflows/ verbatim instead of writing workflow files from scratch
  • Require verifying SHAs via gh api instead of guessing
  • Require the CodeQL actions ecosystem in the matrix where applicable
  • Allow gh api and gh label create for admin operations

Re-toggling the underlying issue will let Claude regenerate this fix using the new rules. The next run should produce a workflow that is byte-identical to the standard template (verified with the canary on TalkTerm#51 → PR #78 yesterday).

@don-petry don-petry closed this Apr 8, 2026
@don-petry don-petry deleted the claude/issue-104-20260407-1732 branch April 8, 2026 22:42
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.

Compliance: missing-dependency-audit.yml

2 participants