Reports

JSON Output

The JSON output schema and a CI/CD integration example.

The --json flag writes structured output suitable for CI/CD pipelines and external tooling.

stacksentry -t https://your-app.com --mode full -j results.json

Schema

{
  "target": "https://your-app.com",
  "timestamp": "2026-04-11T12:34:56Z",
  "grade": "C",
  "score_percentage": 72.7,
  "pass_rate": 0.727,
  "attack_path_count": 0,
  "highest_attack_risk": null,
  "checks": [
    {
      "id": "WS-HSTS-001",
      "layer": "webserver",
      "name": "HSTS header",
      "status": "PASS",
      "severity": "HIGH",
      "details": "Strict-Transport-Security: max-age=31536000; includeSubDomains"
    }
  ],
  "owasp_breakdown": {
    "A01": { "pass": 3, "fail": 1, "warn": 0 },
    "A02": { "pass": 5, "fail": 2, "warn": 1 }
  },
  "attack_paths": [],
  "patches": [],
  "auto_fix_results": [],
  "stack": {
    "language": "python",
    "webserver": "nginx",
    "is_php": false,
    "shared_hosting": false
  }
}

CI/CD Integration

Use the JSON output to fail a pipeline if the grade drops below a threshold:

#!/bin/bash
stacksentry -t https://staging.your-app.com --mode full -j /tmp/scan.json
 
GRADE=$(python3 -c "import json; print(json.load(open('/tmp/scan.json'))['grade'])")
PATHS=$(python3 -c "import json; print(json.load(open('/tmp/scan.json'))['attack_path_count'])")
 
if [ "$GRADE" = "F" ] || [ "$PATHS" -gt 0 ]; then
  echo "Security gate FAILED — grade: $GRADE, attack paths: $PATHS"
  exit 1
fi
 
echo "Security gate PASSED — grade: $GRADE"