Skip to content

chore: dependabot grouped updates, cooldowns & CI hardening - #18

Open
hackertron wants to merge 1 commit into
mainfrom
chore/dependabot-supply-chain-hardening
Open

chore: dependabot grouped updates, cooldowns & CI hardening#18
hackertron wants to merge 1 commit into
mainfrom
chore/dependabot-supply-chain-hardening

Conversation

@hackertron

@hackertron hackertron commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add dependabot.yml with grouped security and version updates per ecosystem (npm, pip, github-actions) — reduces 30+ individual PRs down to 2-3 grouped ones
  • Add 7-14 day cooldown periods before suggesting new versions to mitigate supply chain attacks (blocks ~80% of historical attacks like the axios@1.14.1 RAT incident)
  • Harden CI with npm ci --ignore-scripts to block malicious postinstall hooks

What this changes

File Change
.github/dependabot.yml New config — grouped updates, cooldowns, labels, reviewers
.github/workflows/ci.yml npm cinpm ci --ignore-scripts

Repo settings already configured

  • Dependabot alerts enabled
  • Dependabot malware alerts enabled
  • Grouped security updates enabled
  • Dependabot security updates enabled
  • Auto-dismiss low-impact dev dependency alerts
  • Auto-dismiss false-positive malware alerts

Test plan

  • Verify Dependabot creates grouped PRs on next weekly run (Monday)
  • Verify npm ci --ignore-scripts doesn't break the web build in CI

Summary by CodeRabbit

  • Chores
    • Configured automated dependency management with weekly update schedules for npm packages, Python dependencies, and GitHub Actions across project repositories. Set up grouped pull request strategy with assigned reviewers and ecosystem-specific labels for better dependency tracking.
    • Modified CI workflow dependency installation step to exclude package install scripts from execution during setup.

…hardening

Configure Dependabot with grouped security/version updates per ecosystem
(npm, pip, github-actions) to reduce PR noise. Add 7-14 day cooldown
periods to mitigate supply chain attacks (e.g. axios@1.14.1 incident).
Harden CI with npm ci --ignore-scripts to block postinstall hook attacks.
@coderabbitai

coderabbitai Bot commented Mar 31, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Added Dependabot configuration for automated weekly dependency updates across npm and pip ecosystems plus GitHub Actions, and modified the CI workflow to skip npm install scripts during dependency installation.

Changes

Cohort / File(s) Summary
Dependabot Configuration
.github/dependabot.yml
New configuration file establishing automated weekly dependency checks for npm (/core-web), pip (/core-api), and GitHub Actions (/), with grouped PRs, ecosystem-specific labels, and reviewer assignment.
CI Workflow Optimization
.github/workflows/ci.yml
Modified the "Install dependencies" step to include --ignore-scripts flag when running npm ci, preventing execution of package install scripts.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Dependabot hops along the way,
Updates flow each Monday's day,
Scripts skip swift in CI's flow,
Dependencies trim nice and low!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the three main changes: adding Dependabot grouped updates configuration, setting up cooldowns for supply chain security, and hardening the CI with --ignore-scripts flag.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 chore/dependabot-supply-chain-hardening

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.

@sonarqubecloud

Copy link
Copy Markdown

@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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/dependabot.yml:
- Line 14: The dependabot config sets semver-patch-days to 3 which violates the
7–14 day cooldown policy; update the semver-patch-days value (the YAML key
"semver-patch-days") to a value within the 7–14 range (e.g., 7) and ensure any
duplicate occurrences (the other "semver-patch-days" entry referenced in the
review) are updated consistently.
- Around line 61-69: Update the github-actions dependabot block to enforce
cooldown and add a security group: inside the existing package-ecosystem:
"github-actions" section (the github-actions block that contains schedule and
groups/actions-all), add a cooldown setting (e.g., cooldown: "1d") and extend
the groups map with a security-focused group (e.g., a new key like
security-updates that sets applies-to: security and appropriate patterns) so
security updates are grouped separately from the existing actions-all group.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: af4d00c6-73cf-49dc-a63f-082c536d8973

📥 Commits

Reviewing files that changed from the base of the PR and between 964481a and 956873c.

📒 Files selected for processing (2)
  • .github/dependabot.yml
  • .github/workflows/ci.yml

Comment thread .github/dependabot.yml
default-days: 7
semver-major-days: 14
semver-minor-days: 7
semver-patch-days: 3

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Patch cooldown is below the stated 7–14 day policy.

semver-patch-days is set to 3, which does not match the PR objective of a 7–14 day cooldown window.

🔧 Suggested patch
     cooldown:
       default-days: 7
       semver-major-days: 14
       semver-minor-days: 7
-      semver-patch-days: 3
+      semver-patch-days: 7
@@
     cooldown:
       default-days: 7
       semver-major-days: 14
       semver-minor-days: 7
-      semver-patch-days: 3
+      semver-patch-days: 7

Also applies to: 42-42

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/dependabot.yml at line 14, The dependabot config sets
semver-patch-days to 3 which violates the 7–14 day cooldown policy; update the
semver-patch-days value (the YAML key "semver-patch-days") to a value within the
7–14 range (e.g., 7) and ensure any duplicate occurrences (the other
"semver-patch-days" entry referenced in the review) are updated consistently.

Comment thread .github/dependabot.yml
Comment on lines +61 to +69
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
groups:
actions-all:
applies-to: version-updates
patterns: ["*"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

In GitHub Dependabot configuration, for package-ecosystem "github-actions", confirm whether both "cooldown" and groups with "applies-to: security-updates" are supported.

💡 Result:

Yes, both "cooldown" and groups with "applies-to: security-updates" are supported for the package-ecosystem "github-actions" in GitHub Dependabot configuration. For "cooldown": Official GitHub documentation lists "github-actions" in the table of supported package ecosystems for the cooldown feature (under version updates, as cooldown does not apply to security updates). Additionally, GitHub issue #13039 in dependabot-core confirms support, with a maintainer stating it supports "github-actions". Examples in third-party docs like OpenRewrite also include "github-actions" with cooldown. For groups with "applies-to: security-updates": The "groups" option is available under each package-ecosystem entry, including "github-actions". The "applies-to" parameter supports "security-updates", and GitHub documentation confirms groups apply per package ecosystem without exclusions for "github-actions". Security updates are supported for GitHub Actions, as Dependabot can raise PRs for vulnerable actions, and grouping is a standard configuration option that inherits to security updates.

Citations:


Add cooldown and security grouping to github-actions configuration.

The github-actions block currently lacks both cooldown enforcement and security update grouping. To match the hardening applied to npm/pip, add:

Suggested configuration
   - package-ecosystem: "github-actions"
     directory: "/"
     schedule:
       interval: "weekly"
       day: "monday"
+    cooldown:
+      default-days: 7
+      semver-major-days: 14
+      semver-minor-days: 7
+      semver-patch-days: 7
     groups:
+      actions-security:
+        applies-to: security-updates
+        patterns: ["*"]
       actions-all:
         applies-to: version-updates
         patterns: ["*"]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
groups:
actions-all:
applies-to: version-updates
patterns: ["*"]
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
cooldown:
default-days: 7
semver-major-days: 14
semver-minor-days: 7
semver-patch-days: 7
groups:
actions-security:
applies-to: security-updates
patterns: ["*"]
actions-all:
applies-to: version-updates
patterns: ["*"]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/dependabot.yml around lines 61 - 69, Update the github-actions
dependabot block to enforce cooldown and add a security group: inside the
existing package-ecosystem: "github-actions" section (the github-actions block
that contains schedule and groups/actions-all), add a cooldown setting (e.g.,
cooldown: "1d") and extend the groups map with a security-focused group (e.g., a
new key like security-updates that sets applies-to: security and appropriate
patterns) so security updates are grouped separately from the existing
actions-all group.

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