Skip to content

ci(security): add dependency review workflow - #35

Merged
slucerodev merged 1 commit into
mainfrom
ci/add-dependency-review
May 9, 2026
Merged

ci(security): add dependency review workflow#35
slucerodev merged 1 commit into
mainfrom
ci/add-dependency-review

Conversation

@slucerodev

@slucerodev slucerodev commented May 9, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Chores
    • Added automated dependency review checks for pull requests to enhance code quality and security measures.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 9, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

A new GitHub Actions workflow is added to review dependencies in pull requests targeting the main branch. The workflow runs on pull request events or manual dispatch, grants appropriate permissions, and executes the dependency-review-action to flag dependency vulnerabilities at moderate severity or above with pull request comments.

Changes

Dependency Review Workflow

Layer / File(s) Summary
Workflow Triggers and Permissions
.github/workflows/dependency-review.yml
Workflow named dependency-review runs on pull requests to main and manual dispatch with read access to repository contents and write access to pull requests.
Job Definition
.github/workflows/dependency-review.yml
Single job dependency-review is configured to run on ubuntu-latest.
Dependency Review Action
.github/workflows/dependency-review.yml
Repository is checked out and actions/dependency-review-action@v4 is executed with PR commenting enabled (comment-on-pr: true), failure threshold set to "moderate" severity (fail-on-severity: moderate), and snapshot warnings retry enabled.

Estimated Code Review Effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 A workflow so fine, to check each line,
Dependencies watched, vulnerabilities confined,
With moderate severity as the gate,
Comments on PRs, keeping code safe and great!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'ci(security): add dependency review workflow' accurately and specifically describes the main change - adding a GitHub Actions dependency review security workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/add-dependency-review

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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 and usage tips.

@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 2 package(s) with unknown licenses.
See the Details below.

License Issues

.github/workflows/dependency-review.yml

PackageVersionLicenseIssue Type
actions/checkout4.*.*NullUnknown License
actions/dependency-review-action4.*.*NullUnknown License

OpenSSF Scorecard

PackageVersionScoreDetails
actions/actions/checkout 4.*.* 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Maintained⚠️ 00 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Fuzzing⚠️ 0project is not fuzzed
Packaging⚠️ -1packaging workflow not detected
License🟢 10license file detected
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
Branch-Protection🟢 5branch protection is not maximal on development and all release branches
SAST🟢 8SAST tool detected but not run on all commits
actions/actions/dependency-review-action 4.*.* 🟢 7.8
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Security-Policy🟢 9security policy file detected
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1030 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions🟢 9detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection🟢 6branch protection is not maximal on development and all release branches
SAST🟢 10SAST tool is run on all commits

Scanned Files

  • .github/workflows/dependency-review.yml

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5487f211b8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

on:
pull_request:
branches: ["main"]
workflow_dispatch:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Remove unsupported manual trigger for dependency review

actions/dependency-review-action@v4 derives refs automatically only for pull_request/pull_request_target; on workflow_dispatch it requires explicit base-ref and head-ref inputs. In this workflow, manual runs provide neither, so a manually dispatched job will fail before performing any dependency diff, creating a consistently broken trigger path in .github/workflows/dependency-review.yml.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
.github/workflows/dependency-review.yml (2)

12-16: ⚡ Quick win

Consider adding timeout and concurrency controls.

The job lacks a timeout and concurrency control, which could lead to hanging workflows or overlapping runs on rapid PR updates.

⚙️ Suggested improvements
+concurrency:
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+  cancel-in-progress: true
+
 jobs:
   dependency-review:
     name: Dependency review
     runs-on: ubuntu-latest
+    timeout-minutes: 10
  • concurrency cancels outdated runs when new commits are pushed
  • timeout-minutes prevents the job from hanging indefinitely
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/dependency-review.yml around lines 12 - 16, The
dependency-review job currently lacks concurrency and timeout controls; update
the job definition for "dependency-review" to add a concurrency key (e.g.,
concurrency: { group: "dependency-review-${{ github.ref }}", cancel-in-progress:
true } or similar) to cancel outdated runs, and add timeout-minutes (e.g.,
timeout-minutes: 30) under the job to prevent indefinite hangs; ensure these
keys are placed at the same indentation level as runs-on within the
dependency-review job block.

18-19: ⚡ Quick win

Pin actions/checkout to a specific commit SHA instead of a mutable tag.

Using @v4 can expose the workflow to supply chain attacks if the tag is moved. Pin to commit SHA 34e114876b0b11c390a56381ad16ebd13914f8d5 with a version comment, or upgrade to the latest stable version v6.0.2 (available since January 2026) for improved security and features.

Option 1: Pin v4 to its commit SHA
       - name: Checkout repository
-        uses: actions/checkout@v4
+        uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5  # v4
Option 2: Upgrade to latest stable version (recommended)
       - name: Checkout repository
-        uses: actions/checkout@v4
+        uses: actions/checkout@v6.0.2
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/dependency-review.yml around lines 18 - 19, The workflow
step "Checkout repository" currently uses the mutable tag actions/checkout@v4;
change it to either a pinned commit SHA or a fixed stable release: replace uses:
actions/checkout@v4 with uses:
actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 and add a trailing
comment like "# pinned to v4 commit" or update to the newer stable release uses:
actions/checkout@v6.0.2 (and add a comment "# upgraded to v6.0.2") so the
workflow is not reliant on a mutable tag.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/dependency-review.yml:
- Around line 12-16: The dependency-review job currently lacks concurrency and
timeout controls; update the job definition for "dependency-review" to add a
concurrency key (e.g., concurrency: { group: "dependency-review-${{ github.ref
}}", cancel-in-progress: true } or similar) to cancel outdated runs, and add
timeout-minutes (e.g., timeout-minutes: 30) under the job to prevent indefinite
hangs; ensure these keys are placed at the same indentation level as runs-on
within the dependency-review job block.
- Around line 18-19: The workflow step "Checkout repository" currently uses the
mutable tag actions/checkout@v4; change it to either a pinned commit SHA or a
fixed stable release: replace uses: actions/checkout@v4 with uses:
actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 and add a trailing
comment like "# pinned to v4 commit" or update to the newer stable release uses:
actions/checkout@v6.0.2 (and add a comment "# upgraded to v6.0.2") so the
workflow is not reliant on a mutable tag.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 04e1670e-cf71-40ac-977e-09227aae6c5a

📥 Commits

Reviewing files that changed from the base of the PR and between ee456fa and 5487f21.

📒 Files selected for processing (1)
  • .github/workflows/dependency-review.yml

@slucerodev
slucerodev merged commit 9d1066a into main May 9, 2026
23 checks passed
@slucerodev
slucerodev deleted the ci/add-dependency-review branch May 9, 2026 19:25
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.

1 participant