Cycode CLI
raw JSON → 3.15.0 verified Fri May 01 auth: no python
Cycode CLI (v3.15.0) is a security scanning tool for SAST, SCA, Secrets, and IaC scanning, integrating into developer workflows via CLI or CI/CD. It requires Python >=3.9 and is actively maintained with frequent releases.
pip install cycode Common errors
error ModuleNotFoundError: No module named 'cycode' ↓
cause Cycode is not installed or installed in wrong environment.
fix
Run: pip install cycode
error cycode: error: unrecognized arguments: --stop-on-error ↓
cause --stop-on-error flag was added in v3.12.1. Using an older version.
fix
Upgrade cycode: pip install --upgrade cycode
error AttributeError: module 'cycode' has no attribute 'CycodeClient' ↓
cause Wrong import path; CycodeClient is not at top-level.
fix
Use: from cycode.cli.client import CycodeClient
Warnings
breaking In v3.14.0, Cycode API v4 was exposed through CLI commands. API v3 endpoints may be deprecated. Update any custom integrations. ↓
fix Review your usage of Cycode API endpoints; migrate to v4 endpoints as documented in the changelog.
gotcha The CLI must be authenticated before scanning. Many users forget to set CYCODE_CLIENT_ID and CYCODE_CLIENT_SECRET environment variables. ↓
fix Set environment variables: export CYCODE_CLIENT_ID='your_id' CYCODE_CLIENT_SECRET='your_secret'
gotcha Scanning large repositories may slow down due to file collection and upload. Use --stop-on-error flag to handle scan errors gracefully. ↓
fix Add --stop-on-error flag to cycode scan commands to stop file collection on errors.
Imports
- CycodeClient wrong
from cycode import CycodeClientcorrectfrom cycode.cli.client import CycodeClient
Quickstart
import os
from cycode.cli.client import CycodeClient
client = CycodeClient(
client_id=os.environ.get('CYCODE_CLIENT_ID', ''),
client_secret=os.environ.get('CYCODE_CLIENT_SECRET', '')
)
# Example: scan a file (requires auth)
result = client.scan_file(path='main.py')
print(result)