How Dependabot Missing Cooldown Vulnerability Happens in GitHub Actions and How to Fix It
Introduction
In a Go service's GitHub Actions workflow, we discovered a HIGH severity configuration flaw in .github/dependabot.yml at line 3. The Dependabot configuration was missing a critical security control: a cooldown period before proposing package updates. This meant that whenever npm packages were published—including potentially malicious ones—Dependabot would propose integration into production code within hours, without any delay for security researchers or the community to identify compromised versions.
The vulnerability wasn't in the application code itself, but in the automation that manages dependencies. For a Go service handling HTTP requests, compromised dependencies can become remotely exploitable entry points into production infrastructure.
The Vulnerability Explained
What's Happening in the Code
The original .github/dependabot.yml configuration looked like this:
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
This configuration is dangerously permissive. It tells Dependabot: "Every single day, check npm for new versions and propose updates to the latest published packages." But here's the critical gap—there's no cooldown period specified.
The Attack Scenario
Imagine this timeline:
- 9:00 AM: A malicious actor publishes
innocent-utility@2.5.1to npm with hidden code that exfiltrates environment variables - 9:05 AM: The package passes initial npm automated checks (no immediate flags)
- 3:00 PM: Your Dependabot daily job runs and discovers the new version
- 3:15 PM: Dependabot creates an automatic pull request updating to the compromised version
- 4:00 PM: A developer, trusting the automated update, merges the PR
- 4:30 PM: Your Go service deploys with the backdoored dependency
- 5:00 PM: Security researchers discover the malicious package and notify npm
- 6:00 PM: Too late—your production infrastructure has already been compromised
Why This Matters for This Application
This Go service handles HTTP requests. Compromised dependencies in HTTP handlers are remotely exploitable—an attacker doesn't need direct access to your repository. They can trigger the backdoored code through ordinary API calls. The missing cooldown transforms dependency management from a security control into a potential attack vector.
The Fix
What Specific Changes Were Made
The fix adds a cooldown block to the package ecosystem configuration:
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
+ cooldown:
+ default-days: 7
This two-line addition has significant security implications.
How This Solves the Problem
By adding cooldown: default-days: 7:
- Dependabot will not propose any package updates for 7 days after they're published
- This gives the npm security community and the broader developer ecosystem a 7-day window to identify and report malicious packages
- Most supply chain attacks are discovered and reported within 3-5 days
- Your service gets updates only after they've survived community scrutiny
The Security Improvement
Let's revisit that attack timeline with the fix in place:
- 9:00 AM (Day 1): Malicious actor publishes compromised package
- 3:00 PM (Day 1): Dependabot sees it but does not propose an update (cooldown active)
- 2:00 PM (Day 3): Security researchers discover the backdoor; npm removes the package and issues a security advisory
- Day 8: The cooldown expires, but the malicious version no longer exists on npm
- Day 8: Dependabot proposes the next safe version instead
The 7-day cooldown creates a natural security barrier between publication and integration.
Prevention & Best Practices
For GitHub Actions & Dependabot
-
Always configure cooldown periods in
.github/dependabot.yml
- Minimum recommendation: 7 days
- For high-risk services: 14 days
- For critical infrastructure: 21 days -
Use cooldown alongside other controls:
```yaml
updates:- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
cooldown:
default-days: 7
# Additional controls:
allow:- dependency-type: "direct"
reviewers: - "security-team"
```
- dependency-type: "direct"
- package-ecosystem: "npm"
-
Require manual review for all dependency updates, especially in production branches
-
Monitor security advisories during the cooldown period—don't merge PRs for packages flagged by GitHub's security database
For Supply Chain Security Generally
- Use Software Composition Analysis (SCA) tools to scan dependencies against known vulnerability databases
- Implement dependency signing and verification where available
- Maintain an approved dependencies list that requires explicit approval before use
- Consider vendoring critical dependencies for mission-critical services
- Use lock files (package-lock.json, go.sum) with hash verification
Detection Tools
- Semgrep: Automatically detects missing cooldown blocks (as used here)
- GitHub Advanced Security: Flags dependency risks through Dependabot alerts
- npm audit: Built-in npm tool to identify known vulnerabilities
- Renovate: Alternative to Dependabot with similar capabilities
Security Standards
- CWE-1104: Unmaintained Third-Party Component
- CWE-494: Download of Code Without Integrity Check
- OWASP A06:2021: Vulnerable and Outdated Components
- NIST SP 800-161: Cybersecurity Supply Chain Risk Management
Key Takeaways
- Dependabot without cooldown is a supply chain liability, not a security feature—it becomes an automated pathway for malicious code
- The 7-day cooldown is not arbitrary: it aligns with real-world security research timelines where compromises are typically discovered and disclosed
- This isn't just npm: Apply the same principle to all package ecosystems (Python, Go, Ruby, etc.) in your
dependabot.yml - Cooldown is a multiplier for other defenses: It works best combined with security monitoring, required reviews, and vulnerability scanning
- Production services deserve longer cooldowns: HTTP handlers and any public-facing code should have at least 14-day cooldowns
How Orbis AppSec Detected This
Source: GitHub Actions workflow definition in .github/dependabot.yml at the updates configuration level—the initial point where Dependabot behavior is declared.
Sink: Missing cooldown block for the npm package ecosystem, creating an unbounded window for automatic update proposals.
Missing Control: No delay mechanism between package publication and update proposal; no cooling-off period for community vetting.
CWE: CWE-1104 (Unmaintained Third-Party Component) and CWE-494 (Download of Code Without Integrity Check)
Fix: Added cooldown: default-days: 7 to the npm package ecosystem entry, establishing a 7-day delay before Dependabot proposes updates to newly published packages.
Orbis AppSec automatically detected this vulnerability and opened a pull request with the fix. Try Orbis AppSec on your repositories to find and fix issues like this automatically.
Conclusion
Supply chain attacks are among the most dangerous threats to modern applications. A single compromised dependency can transform your entire service into an attack vector. The Dependabot missing cooldown vulnerability represents a configuration oversight with real teeth—automatic tooling that meant to help security becomes a liability without proper safeguards.
This fix demonstrates that security isn't always about complex code changes. Sometimes the most critical security improvements come from configuration. By adding a simple cooldown block, this Go service gains a 7-day buffer against the entire category of supply chain attacks targeting dependency automation.
Audit your .github/dependabot.yml today. If it lacks a cooldown period, you're one malicious npm package away from a production compromise.
References
- CWE-1104: Unmaintained Third-Party Component
- CWE-494: Download of Code Without Integrity Check
- OWASP A06:2021 – Vulnerable and Outdated Components
- GitHub Dependabot Configuration Options - Cooldown
- NIST SP 800-161: Cybersecurity Supply Chain Risk Management
- Semgrep Rule: Dependabot Missing Cooldown
- fix: this dependabot configuration does not set a co... in...