๐Ÿ’ผStalecollected in 5h

Malicious Code Hides in Anthropic Skills Test Files

Malicious Code Hides in Anthropic Skills Test Files
PostLinkedIn
๐Ÿ’ผRead original on VentureBeat

๐Ÿ’กAnthropic Skills vuln evades scanners via test files, steals creds in tests

โšก 30-Second TL;DR

What Changed

Scanners only check markdown instructions, ignoring .test.ts files

Why It Matters

Developers face stealthy supply-chain attacks when installing shared Skills, risking credential theft in CI/CD pipelines and team repos. This highlights a blind spot in current scanning threat models, amplifying risks from unvetted marketplaces.

What To Do Next

Scan your Skills directories for *.test.ts files and disable auto-test runs in IDEs and CI.

Who should care:Developers & AI Engineers

Key Points

  • โ€ขScanners only check markdown instructions, ignoring .test.ts files
  • โ€ขTest runners execute malicious beforeAll hooks silently during npm test or IDE auto-run
  • โ€ขSkills install copies entire dirs into repos, propagating to teams via git
  • โ€ข26.1% of 31k Skills vulnerable per SkillScan study; Snyk audit confirms risks

๐Ÿง  Deep Insight

AI-generated analysis for this event.

๐Ÿ”‘ Enhanced Key Takeaways

  • โ€ขThe vulnerability stems from the 'Anthropic Skills' architecture allowing arbitrary code execution in the host environment because test runners like Jest operate with the same user-level permissions as the developer's IDE or CI/CD pipeline.
  • โ€ขGecko Security's research indicates that the attack vector is exacerbated by the 'copy-paste' nature of Skill integration, which bypasses traditional dependency management systems like npm or yarn that would otherwise flag malicious packages.
  • โ€ขAnthropic has initiated a mandatory security review for all third-party Skills and is reportedly developing a sandboxed execution environment for test files to isolate them from the host filesystem.

๐Ÿ› ๏ธ Technical Deep Dive

  • โ€ขVulnerability Mechanism: The exploit leverages the 'beforeAll' hook in Jest/Vitest, which executes before any test cases run, allowing the malicious code to perform filesystem traversal or network requests before the developer realizes a test is running.
  • โ€ขAttack Surface: The issue is specific to the 'Anthropic Skills' directory structure, where the platform treats .test.ts files as trusted local assets rather than untrusted external inputs.
  • โ€ขExfiltration Path: Malicious scripts utilize standard Node.js 'fs' and 'http' modules to exfiltrate environment variables (e.g., ANTHROPIC_API_KEY, AWS_SECRET_ACCESS_KEY) to remote command-and-control (C2) servers.

๐Ÿ”ฎ Future ImplicationsAI analysis grounded in cited sources

AI platforms will mandate containerized execution for all third-party plugin code.
The inherent risk of local execution in developer environments forces a shift toward strict sandboxing to prevent supply-chain compromises.
Static analysis tools will pivot to include 'test-file' scanning as a standard security requirement.
Current scanners focus on production code, leaving test suites as a blind spot for malicious actors to hide payloads.

โณ Timeline

2025-09
Anthropic launches the 'Skills' ecosystem for custom AI agent extensions.
2026-03
Gecko Security begins an independent audit of the Anthropic Skills marketplace.
2026-04
Gecko Security privately discloses the .test.ts vulnerability to Anthropic.
2026-05
Public disclosure of the vulnerability following the VentureBeat report.
๐Ÿ“ฐ

Weekly AI Recap

Read this week's curated digest of top AI events โ†’

๐Ÿ‘‰Related Updates

AI-curated news aggregator. All content rights belong to original publishers.
Original source: VentureBeat โ†—