[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$fege3or537EQNZ4jJokN-5U1FOWGBVL-8O9mFMP59PCU":3},{"lesson":4},{"id":5,"slug":6,"article_id":7,"title":8,"body":9,"prevention":10,"framework_refs":11,"framework_notes":19,"status":27,"created_at":28,"published_at":29,"article":30,"tags":34,"podcasts":47,"controls":48},"5341e601-049e-42b4-97b2-5877e994b66e","99-of-repository-access-tokens-never-expire-creating-persistent-attack-surface","8603b5ed-efbf-4785-a050-81d93ddc2507","99% of Repository Access Tokens Never Expire, Creating Persistent Attack Surface","The vast majority of repository access tokens are configured without expiration dates, meaning that credentials issued for short-term projects or to non-human identities like AI coding agents persist indefinitely. If any of these tokens are compromised, attackers gain long-term, potentially undetected access to critical source code repositories. This reflects a systemic failure in identity lifecycle management, where token issuance is not paired with a corresponding revocation or expiration policy. The risk is amplified by excessive permissions, meaning a single compromised token could expose far more than intended. Organizations must treat non-human identities with the same rigor as human user accounts.","**Immediate actions:**\n- Audit all existing repository access tokens and immediately revoke any that are unused, orphaned, or associated with concluded projects.\n- Set mandatory expiration dates on all existing tokens, prioritizing those with broad repository access or administrative privileges.\n\n**Long-term improvements:**\n- Enforce a token lifecycle policy that requires short-lived credentials (e.g., 30–90 days) with automated expiration for all human and non-human identities.\n- Apply the principle of least privilege to all repository tokens, scoping permissions to only the specific repositories and actions required for each use case.\n- Integrate non-human identities (AI agents, CI\u002FCD pipelines, bots) into your identity governance program with the same review cadence as human accounts.\n\n**Detection measures:**\n- Implement continuous monitoring and alerting for token usage anomalies, such as access from unexpected IPs or at unusual times.\n- Establish regular access reviews (at least quarterly) to identify and remove stale or over-privileged tokens across all code repositories.",[12,13,14,15,16,17,18],"CIS Control 5: Account Management","NIST CSF 2.0 PR.AA: Identity Management, Authentication, and Access Control","NIST SP 800-53 SI-2: Flaw Remediation","ISO\u002FIEC 27001:2022 A.8.8: Management of technical vulnerabilities","CIS Control 6: Access Control Management","GDPR Article 32","CIS Control 16: Application Software Security",{"GDPR Article 32":20,"CIS Control 5: Account Management":21,"NIST SP 800-53 SI-2: Flaw Remediation":22,"CIS Control 6: Access Control Management":23,"CIS Control 16: Application Software Security":24,"ISO\u002FIEC 27001:2022 A.8.8: Management of technical vulnerabilities":25,"NIST CSF 2.0 PR.AA: Identity Management, Authentication, and Access Control":26},"Article 32 requires appropriate technical measures to ensure ongoing confidentiality of systems; non-expiring tokens that could expose personal data held in repositories directly undermine this obligation.","This control requires managing the lifecycle of all accounts and credentials, including service accounts and tokens — directly addressing the failure to expire or revoke repository access tokens.","While SI-2 targets software flaws, its principle of continuous remediation applies here: configurations allowing non-expiring tokens represent a known security weakness that should be identified and remediated on a defined schedule.","This control explicitly requires establishing and maintaining access credentials with appropriate expiration and least-privilege scoping, which would have prevented tokens from persisting indefinitely after project completion.","This control covers managing authentication and authorization for applications and services, including service credentials used by CI\u002FCD pipelines and AI agents accessing code repositories.","Persistent, non-expiring tokens with excessive permissions constitute a technical vulnerability in identity configuration that should be inventoried, assessed, and remediated under a formal vulnerability management process.","This function requires organizations to manage identities and credentials for all users and non-human entities, enforcing least privilege and timely revocation — precisely what was missing for these persistent tokens.","published","2026-11-06T06:20:20.618655+00:00","2026-11-06T06:20:20.584+00:00",{"id":7,"url":31,"slug":32,"title":33},"https:\u002F\u002Fwww.helpnetsecurity.com\u002F2026\u002F11\u002F06\u002Fblueflag-ai-agents-access-risks-report\u002F","99-of-repository-access-tokens-never-expire-d75439","99% of repository access tokens never expire",[35,41],{"id":36,"name":37,"slug":38,"description":39,"color":40},"1ec88fde-2d0f-4ed8-932a-33f5ccc0fdc7","Access Control","access-control","Excessive privileges, missing MFA, weak auth","#f97316",{"id":42,"name":43,"slug":44,"description":45,"color":46},"859cf0ad-a7e9-42bb-a75d-bac6511fa5d5","Configuration Management","configuration-management","Misconfigs, default credentials, exposed services","#eab308",[],[49,53,57],{"slug":50,"name":51,"problem":52},"privileged-access-management","Privileged access management (PAM)","Admin accounts stop being one stolen password away from control of everything.",{"slug":54,"name":55,"problem":56},"identity-governance","Identity governance and single sign-on","People who leave or change roles lose access everywhere at once, and forgotten accounts stop piling up.",{"slug":58,"name":59,"problem":60},"secrets-management","Secrets management","API keys, tokens and passwords stop leaking from code, chat and configuration files."]