pymatgen

Pass

Audited by Gen Agent Trust Hub on Sep 2, 2026

Risk Level: SAFEINDIRECT_PROMPT_INJECTIONCREDENTIALS_UNSAFEEXTERNAL_DOWNLOADS
Full Analysis
  • [INDIRECT_PROMPT_INJECTION]: The skill processes untrusted external data such as Crystallographic Information Files (CIF) and JSON datasets which could theoretically contain malicious instructions targeting the agent context. However, the skill implements strong defensive controls:
  • Ingestion points: Files are loaded via load_structure and load_strict_json in scripts/_common.py.
  • Boundary markers: The skill emphasizes structured JSON output and explicit scientific validation rather than raw text interpolation.
  • Capability inventory: The skill allows file read/write and network access to the Materials Project API.
  • Sanitization: It uses pinned versions of pymatgen (2026.5.4) that are patched against known vulnerabilities (e.g., CVE-2024-23346). It also uses object_pairs_hook in JSON parsing to prevent duplicate key attacks and enforces strict bounds on input sizes and site counts.
  • [CREDENTIALS_UNSAFE]: The skill requires the MP_API_KEY for Materials Project access. The implementation in scripts/mp_query.py and scripts/_common.py is highly defensive:
  • It only reads the key from the environment, never from CLI arguments or files.
  • The safe_error_message function explicitly redacts the secret from any exception messages that might be logged or displayed.
  • scripts/artifact_manifest.py includes a SENSITIVE_NAME regex filter to prevent the inclusion of files that likely contain credentials (e.g., .env, *secret*) in provenance manifests.
  • [EXTERNAL_DOWNLOADS]: The skill fetches data from api.materialsproject.org. This is a well-known and trusted scientific service. The network access is gated behind an explicit --execute flag in scripts/mp_query.py to prevent accidental data exfiltration or unauthorized usage.
Audit Metadata
Risk Level
SAFE
Analyzed
Sep 2, 2026, 01:27 PM