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_structureandload_strict_jsoninscripts/_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 usesobject_pairs_hookin 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_KEYfor Materials Project access. The implementation inscripts/mp_query.pyandscripts/_common.pyis highly defensive: - It only reads the key from the environment, never from CLI arguments or files.
- The
safe_error_messagefunction explicitly redacts the secret from any exception messages that might be logged or displayed. scripts/artifact_manifest.pyincludes aSENSITIVE_NAMEregex 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--executeflag inscripts/mp_query.pyto prevent accidental data exfiltration or unauthorized usage.
Audit Metadata