G2CV CASM
raw JSON → 0.3.2 verified Sat May 09 auth: no python
G2CV CASM provides continuous attack surface monitoring capabilities for cloud environments. Current version 0.3.2, released monthly.
pip install g2cv-casm Common errors
error ModuleNotFoundError: No module named 'g2cv' ↓
cause Wrong install or missing dependency; g2cv-casm package does not expose 'g2cv' as top-level import.
fix
pip install g2cv-casm
error g2cv.casm.CASM has no attribute 'scan' ↓
cause Old version (<0.3.0) used different method names; upgrade or use 'run'.
fix
Upgrade: pip install --upgrade g2cv-casm
error TypeError: scan() missing 1 required positional argument: 'target' ↓
cause Using old keyword 'domain' instead of 'target'.
fix
Use casm.scan(target='example.com')
Warnings
breaking The 'scan' function signature changed in 0.3.0; now requires 'target' instead of 'domain'. ↓
fix Update calls from casm.scan(domain='...') to casm.scan(target='...')
deprecated The 'g2cv.casm.CASM' method 'run' deprecated in 0.3.2, use 'scan' instead. ↓
fix Replace casm.run() with casm.scan()
gotcha API key is required but validation is lazy; error surfaces on first scan call, not instantiation. ↓
fix Always ensure CASM_API_KEY env var is set before calling scan().
Imports
- CASM wrong
import casmcorrectfrom g2cv.casm import CASM - scan wrong
from g2cv import scancorrectfrom g2cv.casm import scan
Quickstart
from g2cv.casm import CASM
import os
casm = CASM(api_key=os.environ.get('CASM_API_KEY', ''))
result = casm.scan(target='example.com')
print(result)