agent-security-hardening
AFaffaan-m/ECC315k4,381 new stars in the last 7 days
Learn from public breach disclosures — extract the audit question each one implies and turn it into a checklist for your own stack. Capital One IMDS abuse, LastPass vault exfiltration, Okta Lapsus$, Snowflake credential reuse, MOVEit, SolarWinds, Equifax, Target POS, Codecov, Uber, Twilio, Polymarket's compromised DebugBear script, the OPTIMJACK Optimizely snippet injection — what would you check now if your boss said 'could that happen to us?' Use when the user mentions 'breach analysis,' 'lessons learned,' 'security postmortem,' 'breach patterns,' 'breach lessons,' 'has this happened to us,' 'apply breach lessons,' 'preempt breaches,' 'security retrospective,' 'real-world security incidents,' 'Optimizely compromise,' 'tag manager hacked,' or wants to harden against known attacker playbooks.
The inverse of incident-triage. That skill is "we're on fire, what now." This skill is "go read the breach writeups, extract the audit question each one implies, and check your own stack."
Breaches catalogued here are public, well-documented, and pattern-bearing. Each pattern surfaces a control or check that often falls between OWASP categories — IMDS abuse, supplier credential blast radius, secrets-in-CI, single-sign-on lateral movement, log-tampering pre-breach. These are the controls people add after their first incident; reading other people's breaches is cheaper than writing your own.
Cross-references: every audit skill in this repo. Use this skill to surface "have we considered X?" questions, then pivot to the relevant audit skill for the deep dive. When a breach pattern surfaces a regulatory implication — health data exposure, payment card data exposure, PII exposure — also reach for hipaa-audit, pci-audit, or privacy-engineering to understand the regulatory clock and notification obligations that come with that breach class. When the pattern started with one person's account (a phished founder, a SIM-swapped admin, a developer laptop), run personal-opsec on the people who hold the keys.
This skill reads public breach write-ups and checks the user's own stack against them. Check only systems and code the user owns or is authorized to review, read-only. The patterns describe how real attacks worked so you can close the gap; don't turn one into a working attack against anyone's system. If a check shows the pattern is happening now, stop and switch to incident-triage.
For each breach pattern below:
The output is a "breach-pattern coverage" document — not a fixed report, an evergreen checklist you re-run against your evolving stack.
What happened: A misconfigured WAF allowed SSRF. An attacker used SSRF to reach the EC2 instance metadata service (IMDSv1, no token requirement), pulled temporary IAM credentials, and used them to enumerate and exfiltrate S3 buckets containing 100M+ records.
Audit question: Does any service that takes a URL from user input also have IAM credentials reachable via IMDS?
Check:
MetadataOptions.HttpTokens: required) — see cloud-auditowasp-audit A01 SSRF bypass matrix (especially the cloud metadata endpoints row: 169.254.169.254, metadata.google.internal, 169.254.170.2)What happened: Attackers compromised SolarWinds' build pipeline and inserted a backdoor (Sunburst) into the Orion product. Customers who installed legitimate Orion updates received the backdoored binary. The backdoor enabled lateral movement into customer networks, including the US federal government.
Audit questions:
Check:
iam-audit for cross-account trust patternsWhat happened: Attackers initially compromised an engineer's home computer via a vulnerable third-party media plugin. That gave them access to the engineer's corporate vault. Months later, they used that access to exfiltrate customer vault data — including unencrypted URLs that helped target customers for phishing.
Audit questions:
Check:
iam-audit)What happened: Attackers obtained credentials for a third-party support engineer (Sitel). They spammed the engineer with push-notification MFA prompts until the engineer approved one out of habit / annoyance. They then used the support engineer's access to view (but not modify) some Okta customer tenants.
Audit questions:
Check:
iam-auditWhat happened: Attackers used credentials stolen from infostealer malware on personal devices to log into Snowflake customer environments (which had no MFA enforced). They exfiltrated data from Ticketmaster, AT&T, Santander, and others. Snowflake itself wasn't breached — customers were.
Audit questions:
Check:
iam-auditWhat happened: Cl0p ransomware group exploited an SQL injection zero-day (CVE-2023-34362) in Progress MOVEit Transfer. They exfiltrated data from hundreds of customers — many of whom were transferring sensitive HR / financial / health data via MOVEit. Patches arrived after the exploitation campaign was already running.
Audit questions:
Check:
siem-detection)vuln-research)What happened: A flaw in Codecov's Docker image creation process let attackers extract a credential. They modified Codecov's Bash uploader script to exfiltrate environment variables from every CI run using Codecov. CI environments leak: AWS keys, Stripe keys, npm tokens, GitHub tokens.
Audit questions:
Check:
secrets-audit and iam-auditWhat happened: Attackers social-engineered Twitter employees to access an internal admin tool with broad customer-account powers. They used it to hijack high-profile accounts and run a Bitcoin scam.
Audit questions:
Check:
iam-auditWhat happened: Attackers exploited unpatched Apache Struts CVE-2017-5638 (a known vulnerability with a 2-month-old patch available). They were inside for 76 days before detection, exfiltrating 147M credit records. Patch had been available; vulnerability scanning didn't find it because scan target lists were stale.
Audit questions:
Check:
vuln-research)siem-detectionWhat happened: Attackers compromised a contractor's credentials, used MFA-prompt-fatigue to get in, and then explored. They found PowerShell scripts on a network share containing privileged credentials, and from there accessed AWS, GCP, Google Workspace, and Slack. Among the goodies: a Privileged Access Management tool that the attackers could use to grant themselves more access.
Audit questions:
Check:
secrets-auditWhat happened: Polymarket loaded DebugBear's real-user-monitoring script on its app. On 2026-10-29 the file served from DebugBear's CDN was a wallet drainer for about an hour. It read the session from localStorage, borrowed the page's own trading client, and moved positions out of 33 accounts through Polymarket's relayer, with roughly $2.2–2.7M lost by various estimates. No password or key was sent anywhere; the script used the authority the logged-in page already had. Polymarket's CSP was in place, and the exfil host was the allowed vendor domain. How the file was replaced isn't public yet.
On 2026-11-16 (OPTIMJACK) an attacker wrote code into the Project JavaScript of Optimizely Web customer projects through a flaw in Optimizely's signup flow. Optimizely's CDN served it to 178 organisations' pages for most of a day: a wallet-address swapper, a card skimmer, cookie theft and an iOS exploit loader. Allowlisting the vendor host didn't help; a restrictive script-src did.
Audit question: If any third-party script on our logged-in or money-moving pages were swapped tonight, could it move money, change account details or read session tokens without the user approving?
Check (TP1–TP7, greps and sources in references/third-party-scripts.md):
owasp-audit A03business-logic-testing Step 5owasp-audit A04 and A07'strict-dynamic' and 'unsafe-eval' on pages that load vendor snippets, and restrict connect-src. Monitor the hash or size of each vendor script that stays, and search it for atob( / eval(, not just the IoC domainpci-auditThese defenses are our recommendations, not claims the sources make.
This skill should grow with each major public breach. Process:
Good post-mortem sources:
# Breach Pattern Coverage Assessment
## Environment: [name]
## Date: [date]
### Coverage status
| Pattern | Audit question | Status | Owner |
|---------|----------------|--------|-------|
| IMDS abuse (Capital One) | SSRF-to-metadata reachable? | Clean | sec |
| Supplier blast radius (SolarWinds) | CI/CD blast radius? | Gap — plan attached | platform |
| Third-party script in session (Polymarket/DebugBear) | Can a swapped vendor script move money without user approval? | Gap — plan attached | web |
| ... | | | |
### Gaps with plans
[For each Gap row above — what's the plan, by when]
### Patterns not yet evaluated
[Patterns where you don't yet have data to mark Clean / Gap]
This is a quarterly-rerunable document — not one-and-done. Industry patterns evolve.
incident-triageAFaffaan-m/ECC315k4,381 new stars in the last 7 days
Audit the whole repo: find bugs, security holes and performance bottlenecks. Get a ranked report in plain English.
DIDietrichGebert/ponytail203k4,904 new stars in the last 7 days
GAgarrytan/gstack143k598 new stars in the last 7 days
Harden code against the OWASP Top 10: input handling, authentication, sessions and dependencies.
ADaddyosmani/agent-skills122k1,667 new stars in the last 7 days
ADaddyosmani/agent-skills122k1,667 new stars in the last 7 days
RUruvnet/RuView106k739 new stars in the last 7 days