{
 "public_id": "AIR-2025-0125",
 "incident_id": "2025-08-nx-s1ngularity",
 "date_disclosed": "2025-08-27",
 "date_occurred": "2025-08-26",
 "title": "s1ngularity: compromised Nx npm packages weaponised local Claude, Gemini and Q CLIs to hunt for secrets",
 "class": "in_the_wild",
 "attack_surface": "coding_agent",
 "initial_vector": "github_actions_workflow_injection_then_npm_token_theft",
 "agent_capability_abused": [
  "local_agent_cli_invocation",
  "file_system_search",
  "permission_bypass_flags",
  "shell_execution",
  "filesystem_read",
  "autonomous_reconnaissance",
  "local_ai_cli_invocation",
  "filesystem_enumeration",
  "secret_discovery"
 ],
 "target_product": "nx and Nx ecosystem npm packages; Claude Code, Gemini CLI and Amazon Q CLI on developer machines",
 "target_vendor": "Nx (Nrwl)",
 "autonomy_level": "semi_autonomous",
 "impact_realized": true,
 "impact_type": [
  "credential_theft",
  "data_exfiltration",
  "private_source_code_disclosure",
  "source_code_exposure"
 ],
 "blast_radius": "~4 hours of malicious versions on npm; 2,349 distinct secrets leaked into attacker-created public GitHub repos in victims' own accounts",
 "cve": [],
 "taxonomy": {
  "owasp_asi": [
   "ASI05",
   "ASI06",
   "ASI04",
   "ASI03"
  ],
  "mitre_atlas": [
   "AML.T0010"
  ],
  "labels": [
   "npm_compromise",
   "ci_workflow_injection",
   "agent_cli_abuse",
   "yolo_flags",
   "postinstall",
   "agent_as_attack_tool",
   "dangerously_skip_permissions",
   "yolo_flag",
   "postinstall_malware",
   "secret_harvesting",
   "ssh_key_theft",
   "agent_as_weapon",
   "supply_chain",
   "credential_theft"
  ]
 },
 "defense_present": "npm provenance signing (not enforced at install time); GitHub Actions default permissions",
 "defense_bypassed": true,
 "fix_shipped": "packages unpublished; Nx moved to npm Trusted Publishers with OIDC and mandatory 2FA approval, and disabled pipeline runs for external contributors",
 "primary_sources": [
  "https://nx.dev/blog/s1ngularity-postmortem",
  "https://www.wiz.io/blog/s1ngularity-supply-chain-attack"
 ],
 "verified_quote": "scanned user systems for sensitive data, attempted to use local AI tools (like Claude and Gemini), and uploaded the results to a public GitHub repo via the GitHub CLI.",
 "confidence": "high",
 "notes": "Widely described as the first supply-chain attack to turn developer AI assistants into the reconnaissance tool. The postinstall script invoked locally installed AI CLIs with permission-bypass flags (--yolo / --trust-all-tools / --dangerously-skip-permissions, per secondary coverage) to enumerate credential files. Root cause was a pull_request_target workflow echoing an unsanitised PR title, yielding a read/write token, then a workflow_dispatch publish. Leaked secrets skewed to GitHub PATs plus Google AI, OpenAI, AWS, OpenRouter and Anthropic keys. Also reported under the titles: 's1ngularity: malicious Nx npm packages weaponized Claude Code, Gemini CLI and Amazon Q CLI to hunt for developer secrets'; 's1ngularity: malicious Nx npm releases weaponised locally installed Claude Code, Gemini CLI and Amazon Q to hunt secrets'.",
 "risk_category": "security_fraud",
 "risk_secondary": [
  "privacy",
  "product_misuse",
  "safety_harm"
 ],
 "risk_subcategory": "Supply Chain Compromise",
 "risk_sub_secondary": [
  "Credential & Secret Theft"
 ],
 "ai_entity": "generative",
 "agency": "agent_acted",
 "agency_debatable": false,
 "agency_reason": "the local Claude/Gemini/Q CLIs did the secret hunting themselves",
 "vector_family": "other",
 "vector_detail": "github_actions_workflow_injection_then_npm_token_theft",
 "guardrail_kind": [
  "permission_scope"
 ],
 "guardrail_outcome": "silent",
 "xrefs": {
  "aiid": [],
  "atlas": [
   "AML.T0010"
  ],
  "cve": [],
  "ghsa": []
 },
 "primary_asi": "ASI05",
 "agent_framework": "unknown",
 "model_provider": "multiple",
 "model_name": "",
 "detection_mechanism": "unknown",
 "tool_access": "unknown",
 "financial_loss_band": "unknown",
 "eai_category": "supply_chain_vulnerabilities",
 "eai_domain": "tool_misuse",
 "eai_secondary": [
  "credential_theft",
  "data_exfiltration_channels"
 ],
 "eai_reason": "subcategory: Supply Chain Compromise",
 "asi_curated": [
  "ASI05",
  "ASI06"
 ],
 "asi_scope": "in_scope",
 "asi_provenance": "curated_plus_rule",
 "asi_reason": "curated: ASI05,ASI06 | added ASI04 (eai_category=supply_chain_vulnerabilities), ASI03 (signal=identity)",
 "submitted_by": "EAI Internal"
}