API 経由で取り込み API キーを作成する
bash
TOKEN=$(curl -s -X POST "http://localhost:8000/api/v1/auth/login?email=admin@acme.com&password=changeme123" | python3 -c "import sys, json; print(json.load(sys.stdin)['access_token'])")
curl -s -X POST http://localhost:8000/api/v1/api-keys \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"label":"Pipeline Scanner","expires_in_days":90}'
R最初のパイプライン スキャンを実行し、結果を取り込みます
bash
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
-e SECPLATFORM_API_URL=http://localhost:8000 \
-e SECPLATFORM_API_KEY=sp_your_key_here \
-e SCAN_TOOL=trivy \
-e SCAN_TARGET=python:3.11-slim \
secplatform/pipeline-scanner:latest