DevSecKit is a terminal-first DevSecOps toolkit with two layers:
- Existing scanner CLI (
run devseckit) for practical repo scanning. - New extensible security platform (
devsec_platform) with plugin SDK, orchestrator, risk engine, AI insights, and remediation workflow.
- GitHub Pages demo:
https://imharshitaa.github.io/DevSecKit/demo/
After cloning:
chmod +x run devseckitFor fish (current terminal session):
set -gx PATH (pwd) $PATHFor zsh/bash (current terminal session):
export PATH="$PWD:$PATH"Run scanner CLI:
run devseckitOutput:
- Terminal report
- One JSON report file:
reports/scan_report.json
Run platform API:
python3 -m devsec_platform.apiDemo page:
- Plugin SDK with normalized schemas for
sast,sca,secrets,iac,cspm,easm,dast,iast - Rule-based + AI-assisted orchestration by events:
pr,deploy,runtime - Real scanner-backed plugin adapters (Semgrep, Trivy, Gitleaks, TruffleHog, Checkov, ZAP, IAST-lite)
- Parallel scan execution with per-plugin hard timeouts and isolated temporary report directories
- Risk correlation engine with unified risk object:
- exploitability score
- exposure score
- business impact score
- composite score
- AI module for context-aware vulnerability analysis and fix suggestions
- Auto-remediation planner with GitHub PR preview/creation hooks
- Guardrails: RBAC, audit logs, remediation validation
DevSecKit/
├── run # preferred scanner launcher command
├── devseckit # scanner launcher wrapper
├── devsec # legacy scanner launcher wrapper
├── devseckit.py # terminal scanner orchestrator
├── demo/
│ └── index.html # terminal demo UI
├── devsec_platform/
│ ├── api.py # REST API server
│ ├── orchestrator.py # rule + AI plugin routing and execution
│ ├── risk_engine.py # finding correlation and scoring
│ ├── ai_module.py # risk analysis and plugin suggestion
│ ├── remediation.py # remediation plans and GitHub PR hooks
│ ├── guardrails.py # RBAC and validation
│ ├── audit.py # audit logging
│ ├── schemas.py # internal dataclasses and model helpers
│ └── plugins/
│ ├── base.py # plugin interface
│ ├── builtin.py # built-in plugin implementations
│ └── registry.py # plugin registry
├── sdk/
│ └── schemas/
│ ├── scan-request.schema.json
│ ├── finding.schema.json
│ └── unified-risk.schema.json
├── docs/
│ ├── ARCHITECTURE.md
│ └── API.md
├── examples/
│ └── node-plugin/
│ ├── trivy-sca-plugin.js
│ ├── server.js
│ └── README.md
├── scanners/ # tool wrappers for existing CLI
└── .github/workflows/devsec-platform-ci.yml
List available plugins:
curl -sS http://127.0.0.1:8787/api/v1/pluginsRun event-aware scan:
curl -sS -X POST http://127.0.0.1:8787/api/v1/scans \
-H "Authorization: Bearer $DEVSEC_API_TOKEN" \
-H 'content-type: application/json' \
-d '{
"event_type":"deploy",
"target":{"repo_url":"https://github.com/OWASP/NodeGoat","environment":"prod","runtime_url":"http://localhost:3000"},
"context":{"business_service":"payments","internet_exposed":true,"data_classification":"confidential","known_exploits":true,"changed_files":["infra/main.tf","pnpm-lock.yaml"]},
"roles":["security_engineer"],
"actor":"demo-user"
}'API security defaults:
DEVSEC_API_TOKENis required for all/api/*endpoints.- Request must include explicit
actorandroles(no privileged role defaults).
Command:
run devseckit- Choose scan target:
- Scan local source directory
- Scan remote directory (provide git URL)
- Choose scan categories:
sast,sca,secrets,iac,dast,iast, orall - If dynamic scans selected, provide target URL.
- Review terminal report and one final JSON file:
reports/scan_report.json.
Note:
- SCA in platform mode currently uses Trivy only.
dependencycheck.shis intentionally excluded until the script issue is fixed.
Use terminal output directly (no API call needed):
devseckit platform --event pr --repo https://github.com/WebGoat/WebGoatOptions:
--event pr|deploy|runtime--plugins sast,sca,secrets,iac,cspm,easm,dast,iast(optional override)--internet-exposed--known-exploits--business-service <name>--data-classification internal|confidential|restricted--jsonfor full structured output
- Emit findings following finding.schema.json
- Unified risk follows unified-risk.schema.json
Sample GitHub Actions workflow:
It starts the API, executes a sample orchestrated scan, validates response shape, and uploads artifacts.
- Event arrives (
pr,deploy,runtime) - Orchestrator selects plugins with rule-based + AI augmentation
- Plugins produce normalized findings
- Risk engine correlates and scores into unified risks
- AI module generates context-aware remediation guidance
- Guardrails validate remediation and enforce RBAC
- Optional GitHub PR creation for auto-remediation
- Audit trail stored in
reports/audit/devsec_platform_audit_YYYYMMDD.log
- Demo UI remains terminal-style and shows realistic streaming multi-module logs.
- Demo command is
devseckit(demo-only simulation). - Sample target git options are included directly in the terminal prompt flow.