Skip to main content

Security testing

Français : ../testing.md

Control Plane tests​

cd services/control-plane
pytest -q tests/test_security_*.py tests/test_platform_security_manifests.py
FileCovers
test_security_api.pyPosture API and security settings
test_security_auth.pyJWT (alg none, HS/RS confusion, kid, claims), API keys
test_security_commands.pysafe_exec: command injection, ffmpeg, garak
test_security_config.pySecure defaults and list parsing
test_security_egress.pyEgress guard: SSRF, DNS rebinding, redirects, metadata
test_security_egress_wiring.pyEgress guard wired into tools, MCP, OAuth
test_security_events.pySecurity events in the audit chain
test_security_http.pyHeaders, body limits, hosts, proxies, rate limiting, startup guard
test_security_inputs.pyTemplates, YAML, path traversal, IDOR, mass assignment, CSV
test_security_prompt_injection.pyDirect and indirect injection, output, canary
test_security_sql_inputs.py, test_security_sql_static.pySQL injection (payloads and static checker)
test_security_tenant_settings.pyTenant settings validation
test_security_attack_suite.pyAttack suite over every API operation: authentication, roles, injection fuzz, IDOR, mass assignment, WebSocket, webhooks
test_platform_security_manifests.pyHelm, Cilium, Kyverno, PostgreSQL manifests

Scanners (commands from .gitlab-ci.yml)​

ToolLocal commandGitLab jobForgejo job
banditbandit -r services/control-plane/src sdks/python/src --severity-level high --confidence-level mediumbanditsecurity-sast
semgrepsemgrep scan --config p/owasp-top-ten --config p/python --config p/typescript --severity ERROR --errorsemgrepsecurity-semgrep
pip-auditpip-audit --strict <project>pip-auditsecurity-deps-python
npm auditnpm audit --audit-level=high --omit=devnpm-auditsecurity-deps-node
gitleaksgitleaks git --redact --exit-code 1 . then gitleaks dir --redact --exit-code 1 .gitleakssecurity-secrets
Trivytrivy fs ., trivy config deploy, trivy image <image>trivy-fs, trivy-config, trivy-imagesecurity-fs
OWASP ZAP baselinezap-baseline.py -t <target> (image ghcr.io/zaproxy/zaproxy)zap-baselinesecurity-dast
kyvernokyverno test deploy/policies/kyverno/testsmanifestssecurity-manifests
opaopa test deploy/policies/opa -vopapolicies
garakpython -m garak --model_type rest --generator_option_file deploy/ci/garak-rest.json --probes promptinject,dan,leakreplaygarakai-redteam
promptfoonpx --yes promptfoo@latest eval -c deploy/ci/promptfoo.yamlpromptfooai-redteam

Thresholds and blocking policy are described in ci-security-gates.