Skip to main content
COSMICBYTEZLABS
NewsSecurityHOWTOsToolsTraining
StudyProjectsNewsletterHire MeAbout
Subscribe

Press Enter to search or Esc to close

News
Security
HOWTOs
Tools
Training
Study
Projects
Newsletter
Hire Me
About
RSS Feed
Reading List
Subscribe

Stay in the Loop

Get the latest security alerts, tutorials, and tech insights delivered to your inbox.

Subscribe NowFree forever. No spam.
COSMICBYTEZLABS

Your trusted source for IT intelligence, cybersecurity insights, and hands-on technical guides.

2066+ Articles
153+ Guides

CONTENT

  • Latest News
  • Security Alerts
  • HOWTOs
  • Checklists
  • Projects
  • Exam Prep

RESOURCES

  • Search
  • Browse Tags
  • Newsletter Archive
  • Reading List
  • RSS Feed

COMPANY

  • About Us
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CosmicBytez Labs. All rights reserved.

System Status: Operational
  1. Home
  2. News
  3. GitHub and PyPI Add Time-Based Defenses Against Supply Chain Attacks
GitHub and PyPI Add Time-Based Defenses Against Supply Chain Attacks
NEWS

GitHub and PyPI Add Time-Based Defenses Against Supply Chain Attacks

GitHub and PyPI have introduced time-based mechanisms in the Dependabot dependency management tool to protect against supply-chain attacks, limiting the impact window for typosquatting, dependency confusion, and compromised package hijacks.

Dylan H.

News Desk

July 26, 2026
5 min read

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.

FeatureDescription
Time-based pinningDependabot delays processing newly published package versions
Verification windowNew packages must age past a configurable threshold
PyPI publish verificationPyPI enforces its own publish-time review period for new packages
Typosquatting protectionWindow 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 chain

Attack Types This Mitigates

Attack TypeHow Time Window Helps
Dependency ConfusionMalicious internal-name package on PyPI flagged before adoption
TyposquattingBrief window allows automated typo-detection to catch lookalike packages
Compromised MaintainerAccount takeover and malicious publish caught before propagation
Version Rollback AttacksSuspicious downgrade-then-upgrade activity flagged
Transitive Dependency HijackSecond-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-hashes

Configuring 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

  1. Enable time-based Dependabot controls — Set minimum-package-age to at least 72 hours for production dependencies
  2. Use hash pinning — Pin exact hashes in requirements.txt to prevent silent version substitution
  3. Enforce Trusted Publishing — For packages you maintain, use PyPI Trusted Publishing to provide provenance attestation
  4. Monitor new dependency PRs — Review Dependabot PRs critically; don't auto-merge without human review
  5. Subscribe to PyPI security advisories — Follow PyPI's security feed for your critical dependencies
  6. Audit transitive dependencies — Use pip-audit or safety to 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.txt

Industry Context

This move by GitHub and PyPI follows a string of high-profile supply chain incidents:

IncidentYearMethod
XZ Utils backdoor2024Compromised maintainer
PyTorch nightly compromise2022Dependency confusion
event-stream npm hijack2018Malicious maintainer handoff
SolarWinds SUNBURST2020Build pipeline compromise
polyfill.io CDN hijack2024Domain 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

Related Reading

  • Trivy Security Scanner GitHub Actions Breached — 75 Tags Hijacked
  • Glassworm Supply Chain Attack Abuses 72 Open VSX Extensions
#Supply Chain#GitHub#PyPI#Dependabot#Open Source Security

Related Articles

GitHub to Disable npm Install Scripts by Default to Stop Supply Chain Attacks

GitHub has announced that npm version 12 will disable install scripts by default as a breaking change aimed at combating software supply chain attacks...

4 min read

PyTorch Lightning and Intercom-client Hit in Supply Chain

Threat actors compromised the popular Python PyPI package 'Lightning' — used for PyTorch model training — pushing malicious versions 2.6.2 and onward to...

6 min read

FakeGit Campaign Uses 7,600 GitHub Repos to Push SmartLoader Malware

A large-scale malware distribution operation called FakeGit has seeded 7,600 malicious GitHub repositories that collectively amassed over 14 million...

6 min read
Back to all News