Read-only DPDP compliance scanner for the DPDPOS Compliance Management Platform.
It collects evidence from code/config/docs, packages structured findings, and ships them to the backend. It never mutates customer source files.
Requires Node.js 20+.
npm install -g dpdp-cliOr run without a global install:
npx -p dpdp-cli dpdp <command>The published binary name is dpdp.
- Set
"private": falseinpackage.jsonwhen ready. npm run buildthennpm test.npm login→npm publish --access public.
Point end users at your deployed API URL (https://…), not localhost.
Full stack deploy (API, worker, Vercel, Neon, Upstash, R2, Entra, npm):
see dpdpos_backend/docs/14_deployment.md.
Enterprise SSO does not change how the CLI authenticates for scans.
- Operators sign into the frontend with Microsoft Entra, Windows AD (LDAP), or local password.
- They mint a
dpdp_…assessment CLI token in the Assessments → CLI tab (requiresassessment:cli_token). - The CLI continues to use that opaque token for
scan/submit/status.
This keeps machine evidence tokens separate from human SSO sessions (better audit, shorter blast radius if a laptop token leaks).
Optional: DPDP_USER_TOKEN (user JWT after SSO) may still be used only for the optional report command.
Use the product frontend (not PowerShell, not /demo):
- Open the DPDPOS console and sign in (password, Microsoft, or Windows AD)
- Go to Assessments → open (or create) an assessment
- Complete Documents + Questionnaire tabs
- Open the CLI tab → Generate CLI token
- Copy the one-time
dpdp_…token and the command block (includesnpm install -g dpdp-cliand the production--apiURL)
Create a new assessment version in the Overview tab before a historical rescan. Then run scan + submit again on that version.
Evaluation and reports live in the frontend Results tab (Evaluate controls). The CLI report command is optional and needs a separate user JWT (DPDP_USER_TOKEN).
npm install -g dpdp-cli
dpdp init
dpdp login --token <dpdp_...> --api https://your-api.example.com
dpdp configure --assessment <uuid>
dpdp scan .
dpdp evidence
dpdp submit
dpdp statusnpm install
npx tsx src/index.ts login --token <dpdp_...> --api http://127.0.0.1:3000
npx tsx src/index.ts configure --assessment <uuid>
npx tsx src/index.ts scan ./fixtures/sample-app
npx tsx src/index.ts evidence
npx tsx src/index.ts submit
npx tsx src/index.ts status# VAPT capability (passive, authorized scope only; backend not connected yet)
npx tsx src/index.ts vapt scope --target https://app.example.com --target-type URL --authorized-by you@corp --purpose "release assessment"
npx tsx src/index.ts vapt scan
npx tsx src/index.ts vapt findingsscansaves findings locally first, then creates a remote scan job.- Token values from the platform always start with
dpdp_. rescan= scan + submit on the current assessment version (version bump is done in the frontend).vaptis a passive, non-destructive capability: it refuses to run without an explicitly authorized scope, never contacts excluded targets/ports, and stores findings locally under~/.dpdp/. Backend VAPT APIs do not exist yet, sovapt submit/vapt statusreport local state and show the exact payload that will be submitted once connected.
Local state lives under ~/.dpdp/ and is migrated automatically from the
legacy single-file ~/.dpdp/config.json on first use (non-destructive):
~/.dpdp/
schema.json storage schema version
config/config.json apiBaseUrl, assessmentId
config/vapt/<assessmentId>.json per-assessment VAPT scope (Phase 4)
credentials/credentials.json CLI token (mode 0600 on POSIX)
state/current-scan.json pointer to the current scan (DPDP only)
state/scans/<scanId>.json per-scan state (job id, status, timestamps; VAPT scans carry capability + extra)
evidence/<scanId>.json per-scan evidence (DPDP findings, or VAPT findings at schemaVersion 2)
Evidence is stored per scan, survives failed submissions, and can be
retrieved offline; the bearer token never appears outside
credentials/credentials.json.
npm install
npm run build # typecheck + compile to dist/
npm test # node:test via tsx (no extra test deps)The CLI is organized as an evidence-collection platform: the scanner engine
(src/core/scanner/) orchestrates collectors → analyzers → evidence
normalization/dedup. The current regex scanner is one analyzer
(src/analyzers/source/regex/); future analyzers register into the engine via
src/core/profiles/ without touching the engine or CLI entry point.
The data and execution contract for the future VAPT capability is defined in
docs/vapt/ (design only — nothing implemented).
| Repo | Purpose |
|---|---|
dpdpos_backend |
API + worker — see docs/14_deployment.md |
dpdpos |
Next.js console (Vercel) |