Time Is Now a Security Control
Software supply chain attacks have become one of the most potent threat vectors in modern cybersecurity — from SolarWinds to XZ Utils, attackers increasingly target the dependency layer rather than applications directly. In response, GitHub and PyPI (Python Package Index) have jointly introduced time-based defenses through Dependabot, creating a new class of protection designed to limit the blast radius of compromised or malicious packages.
What Changed
The new mechanism introduces a time-based verification window for dependency updates processed through Dependabot. Rather than accepting a new package version immediately upon publication, the system enforces a waiting period before automatically applying updates.
| Feature | Description |
|---|---|
| Time-based pinning | Dependabot delays processing newly published package versions |
| Verification window | New packages must age past a configurable threshold |
| PyPI publish verification | PyPI enforces its own publish-time review period for new packages |
| Typosquatting protection | Window allows security scanners to flag suspicious new releases |
Why Time-Based Defenses Work
Supply chain attacks often exploit the gap between a malicious package being published and defenders detecting it. A time-based window directly narrows this gap by:
- Preventing instant propagation — Dependabot PRs are not opened until the package has aged past the threshold
- Allowing community vetting — Security researchers, automated scanners, and maintainers have time to flag suspicious releases
- Blocking fast-and-exit attacks — Attackers who publish a malicious version and quickly delete it cannot exploit the dependency before it's flagged
Traditional Flow (vulnerable):
Attacker publishes malicious v2.3.1
→ Dependabot opens PR within minutes
→ Automated merge CI deploys to prod
→ Attacker's payload executes
Time-Based Flow (protected):
Attacker publishes malicious v2.3.1
→ Dependabot holds update for N hours/days
→ Security scanners flag suspicious release
→ Alert raised before PR is ever opened
→ Dependency never enters the supply chainAttack Types This Mitigates
| Attack Type | How Time Window Helps |
|---|---|
| Dependency Confusion | Malicious internal-name package on PyPI flagged before adoption |
| Typosquatting | Brief window allows automated typo-detection to catch lookalike packages |
| Compromised Maintainer | Account takeover and malicious publish caught before propagation |
| Version Rollback Attacks | Suspicious downgrade-then-upgrade activity flagged |
| Transitive Dependency Hijack | Second-order dependencies also subject to the delay |
PyPI's Parallel Effort
PyPI independently introduced publish-time verification windows that require new package versions to pass a brief automated review before becoming available for automatic ingestion by tools like pip and Dependabot. This includes:
- Malware scanning on upload using multiple detection engines
- Automated typosquatting detection against the top-downloaded package corpus
- Provenance attestation verification for packages using Trusted Publishing
# PyPI Trusted Publishing — enforced on new packages
# Packages without provenance attestation face longer review windows
pip install somepackage --require-hashesConfiguring Dependabot Time-Based Controls
GitHub's new Dependabot configuration options allow teams to tune the time window per ecosystem:
# .github/dependabot.yml
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
# New: minimum package age before Dependabot opens a PR
minimum-package-age: "7 days"
open-pull-requests-limit: 10
ignore:
# Ignore pre-release versions entirely
- dependency-name: "*"
update-types: ["version-update:semver-pre-release"]Recommendations for Security Teams
- Enable time-based Dependabot controls — Set
minimum-package-ageto at least 72 hours for production dependencies - Use hash pinning — Pin exact hashes in
requirements.txtto prevent silent version substitution - Enforce Trusted Publishing — For packages you maintain, use PyPI Trusted Publishing to provide provenance attestation
- Monitor new dependency PRs — Review Dependabot PRs critically; don't auto-merge without human review
- Subscribe to PyPI security advisories — Follow PyPI's security feed for your critical dependencies
- Audit transitive dependencies — Use
pip-auditorsafetyto scan the full dependency tree
# Audit Python dependencies for known vulnerabilities
pip install pip-audit
pip-audit --require-hashes -r requirements.txt
# Check for typosquatted packages
pip install typogard
typogard check requirements.txtIndustry Context
This move by GitHub and PyPI follows a string of high-profile supply chain incidents:
| Incident | Year | Method |
|---|---|---|
| XZ Utils backdoor | 2024 | Compromised maintainer |
| PyTorch nightly compromise | 2022 | Dependency confusion |
| event-stream npm hijack | 2018 | Malicious maintainer handoff |
| SolarWinds SUNBURST | 2020 | Build pipeline compromise |
| polyfill.io CDN hijack | 2024 | Domain purchase + malicious redirect |
The addition of time-based controls represents a shift from purely reactive (CVE detection post-publish) to proactive temporal controls — a meaningful architectural improvement for the open-source ecosystem.
Sources
- BleepingComputer — GitHub, PyPI add time-based defenses against supply chain attacks
- PyPI Blog — Security improvements for package publishing
- GitHub Security Blog — Dependabot supply chain hardening