pramanasutra 0.0.0-stage → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/pramanasutra-access/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-api/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-data/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-defect/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-evidence/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-flake/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-flow/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-load/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-pipeline/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-prime/SKILL.md +38 -0
- package/.agents/skills/pramanasutra-regression/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-release/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-secure/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-strategy/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-unit/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-verify/SKILL.md +34 -0
- package/.agents/skills/pramanasutra-visual/SKILL.md +34 -0
- package/.claude/agents/pramanasutra-prime.md +7 -0
- package/CHANGELOG.md +56 -0
- package/LICENSE +201 -0
- package/NOTICE +2 -0
- package/README.md +138 -2
- package/docs/.nojekyll +0 -0
- package/docs/00-start-here.html +195 -0
- package/docs/01-executive-summary.html +192 -0
- package/docs/02-functional-specification.html +199 -0
- package/docs/03-architecture.html +233 -0
- package/docs/04-technical-reference.html +204 -0
- package/docs/05-user-guide.html +232 -0
- package/docs/06-cli-and-reports.html +200 -0
- package/docs/07-rule-catalog.html +194 -0
- package/docs/08-skills-and-agents.html +191 -0
- package/docs/09-security-and-privacy.html +192 -0
- package/docs/10-legal-and-compliance.html +203 -0
- package/docs/11-testing-and-proof.html +197 -0
- package/docs/12-ci-and-release.html +208 -0
- package/docs/13-roadmap-and-status.html +186 -0
- package/docs/14-faq-and-glossary.html +204 -0
- package/docs/15-maintainer-guide.html +200 -0
- package/docs/agent-catalog.md +3 -0
- package/docs/api.md +3 -0
- package/docs/architecture.md +15 -0
- package/docs/assets/favicon.svg +1 -0
- package/docs/assets/site.css +183 -0
- package/docs/assets/site.js +79 -0
- package/docs/audit/report.html +39 -0
- package/docs/audit/report.json +59 -0
- package/docs/audit/report.md +80 -0
- package/docs/commands.md +13 -0
- package/docs/compatibility.md +15 -0
- package/docs/configuration.md +3 -0
- package/docs/execution-safety.md +3 -0
- package/docs/handbook/01-executive-summary.html +1 -0
- package/docs/handbook/01-executive-summary.md +51 -0
- package/docs/handbook/02-functional-specification.html +1 -0
- package/docs/handbook/02-functional-specification.md +69 -0
- package/docs/handbook/03-technical-specification.html +1 -0
- package/docs/handbook/03-technical-specification.md +85 -0
- package/docs/handbook/04-architecture.html +1 -0
- package/docs/handbook/04-architecture.md +107 -0
- package/docs/handbook/05-user-guide.html +1 -0
- package/docs/handbook/05-user-guide.md +117 -0
- package/docs/handbook/06-cli-reference.html +1 -0
- package/docs/handbook/06-cli-reference.md +88 -0
- package/docs/handbook/07-security-privacy-legal.html +1 -0
- package/docs/handbook/07-security-privacy-legal.md +65 -0
- package/docs/handbook/08-testing-and-proof.html +1 -0
- package/docs/handbook/08-testing-and-proof.md +83 -0
- package/docs/handbook/09-compatibility-and-roadmap.html +1 -0
- package/docs/handbook/09-compatibility-and-roadmap.md +53 -0
- package/docs/handbook/10-contributor-guide.html +1 -0
- package/docs/handbook/10-contributor-guide.md +64 -0
- package/docs/handbook/11-glossary-and-faq.html +1 -0
- package/docs/handbook/11-glossary-and-faq.md +52 -0
- package/docs/handbook/12-rule-catalog.html +1 -0
- package/docs/handbook/12-rule-catalog.md +65 -0
- package/docs/handbook/README.md +40 -0
- package/docs/handbook/index.html +1 -0
- package/docs/index.html +195 -0
- package/docs/legal/trademark-and-name-clearance.html +1 -0
- package/docs/legal/trademark-and-name-clearance.md +32 -0
- package/docs/master-claude-prompt.md +483 -0
- package/docs/proof/eval-results.json +91 -0
- package/docs/proof/test-results.txt +51 -0
- package/docs/quality-gates.md +10 -0
- package/docs/report-schema.md +22 -0
- package/docs/roadmap.md +3 -0
- package/docs/robots.txt +22 -0
- package/docs/samples/clean-project/report.html +29 -0
- package/docs/samples/clean-project/report.json +45 -0
- package/docs/samples/clean-project/report.md +67 -0
- package/docs/samples/focused-test/report.html +29 -0
- package/docs/samples/focused-test/report.json +60 -0
- package/docs/samples/focused-test/report.md +74 -0
- package/docs/samples/missing-ci/report.html +29 -0
- package/docs/samples/missing-ci/report.json +59 -0
- package/docs/samples/missing-ci/report.md +75 -0
- package/docs/samples/missing-tests/report.html +29 -0
- package/docs/samples/missing-tests/report.json +59 -0
- package/docs/samples/missing-tests/report.md +75 -0
- package/docs/samples/multi-language/report.html +33 -0
- package/docs/samples/multi-language/report.json +116 -0
- package/docs/samples/multi-language/report.md +110 -0
- package/docs/samples/unsafe-names/report.html +29 -0
- package/docs/samples/unsafe-names/report.json +61 -0
- package/docs/samples/unsafe-names/report.md +75 -0
- package/docs/server-deployment.md +3 -0
- package/docs/sitemap.xml +20 -0
- package/docs/standards.md +12 -0
- package/docs/status.md +20 -0
- package/docs/troubleshooting.md +7 -0
- package/docs/trust-model.md +3 -0
- package/documents/pramanasutra/00-start-here.md +85 -0
- package/documents/pramanasutra/01-executive-summary.md +61 -0
- package/documents/pramanasutra/02-functional-specification.md +90 -0
- package/documents/pramanasutra/03-architecture.md +102 -0
- package/documents/pramanasutra/04-technical-reference.md +121 -0
- package/documents/pramanasutra/05-user-guide.md +152 -0
- package/documents/pramanasutra/06-cli-and-reports.md +79 -0
- package/documents/pramanasutra/07-rule-catalog.md +79 -0
- package/documents/pramanasutra/08-skills-and-agents.md +68 -0
- package/documents/pramanasutra/09-security-and-privacy.md +73 -0
- package/documents/pramanasutra/10-legal-and-compliance.md +72 -0
- package/documents/pramanasutra/11-testing-and-proof.md +72 -0
- package/documents/pramanasutra/12-ci-and-release.md +89 -0
- package/documents/pramanasutra/13-roadmap-and-status.md +68 -0
- package/documents/pramanasutra/14-faq-and-glossary.md +81 -0
- package/documents/pramanasutra/15-maintainer-guide.md +81 -0
- package/documents/pramanasutra/README.md +11 -0
- package/documents/pramanasutra/audit/report.html +39 -0
- package/documents/pramanasutra/audit/report.json +59 -0
- package/documents/pramanasutra/audit/report.md +80 -0
- package/documents/pramanasutra/html/00-start-here.html +195 -0
- package/documents/pramanasutra/html/01-executive-summary.html +192 -0
- package/documents/pramanasutra/html/02-functional-specification.html +199 -0
- package/documents/pramanasutra/html/03-architecture.html +233 -0
- package/documents/pramanasutra/html/04-technical-reference.html +204 -0
- package/documents/pramanasutra/html/05-user-guide.html +232 -0
- package/documents/pramanasutra/html/06-cli-and-reports.html +200 -0
- package/documents/pramanasutra/html/07-rule-catalog.html +194 -0
- package/documents/pramanasutra/html/08-skills-and-agents.html +191 -0
- package/documents/pramanasutra/html/09-security-and-privacy.html +192 -0
- package/documents/pramanasutra/html/10-legal-and-compliance.html +203 -0
- package/documents/pramanasutra/html/11-testing-and-proof.html +197 -0
- package/documents/pramanasutra/html/12-ci-and-release.html +208 -0
- package/documents/pramanasutra/html/13-roadmap-and-status.html +186 -0
- package/documents/pramanasutra/html/14-faq-and-glossary.html +204 -0
- package/documents/pramanasutra/html/15-maintainer-guide.html +200 -0
- package/documents/pramanasutra/html/audit/report.html +39 -0
- package/documents/pramanasutra/html/audit/report.json +59 -0
- package/documents/pramanasutra/html/audit/report.md +80 -0
- package/documents/pramanasutra/html/index.html +195 -0
- package/documents/pramanasutra/html/proof/eval-results.json +91 -0
- package/documents/pramanasutra/html/proof/test-results.txt +51 -0
- package/documents/pramanasutra/html/robots.txt +22 -0
- package/documents/pramanasutra/html/samples/clean-project/report.html +29 -0
- package/documents/pramanasutra/html/samples/clean-project/report.json +45 -0
- package/documents/pramanasutra/html/samples/clean-project/report.md +67 -0
- package/documents/pramanasutra/html/samples/focused-test/report.html +29 -0
- package/documents/pramanasutra/html/samples/focused-test/report.json +60 -0
- package/documents/pramanasutra/html/samples/focused-test/report.md +74 -0
- package/documents/pramanasutra/html/samples/missing-ci/report.html +29 -0
- package/documents/pramanasutra/html/samples/missing-ci/report.json +59 -0
- package/documents/pramanasutra/html/samples/missing-ci/report.md +75 -0
- package/documents/pramanasutra/html/samples/missing-tests/report.html +29 -0
- package/documents/pramanasutra/html/samples/missing-tests/report.json +59 -0
- package/documents/pramanasutra/html/samples/missing-tests/report.md +75 -0
- package/documents/pramanasutra/html/samples/multi-language/report.html +33 -0
- package/documents/pramanasutra/html/samples/multi-language/report.json +116 -0
- package/documents/pramanasutra/html/samples/multi-language/report.md +110 -0
- package/documents/pramanasutra/html/samples/unsafe-names/report.html +29 -0
- package/documents/pramanasutra/html/samples/unsafe-names/report.json +61 -0
- package/documents/pramanasutra/html/samples/unsafe-names/report.md +75 -0
- package/documents/pramanasutra/html/sitemap.xml +20 -0
- package/documents/pramanasutra/proof/eval-results.json +91 -0
- package/documents/pramanasutra/proof/test-results.txt +51 -0
- package/documents/pramanasutra/samples/clean-project/report.html +29 -0
- package/documents/pramanasutra/samples/clean-project/report.json +45 -0
- package/documents/pramanasutra/samples/clean-project/report.md +67 -0
- package/documents/pramanasutra/samples/focused-test/report.html +29 -0
- package/documents/pramanasutra/samples/focused-test/report.json +60 -0
- package/documents/pramanasutra/samples/focused-test/report.md +74 -0
- package/documents/pramanasutra/samples/missing-ci/report.html +29 -0
- package/documents/pramanasutra/samples/missing-ci/report.json +59 -0
- package/documents/pramanasutra/samples/missing-ci/report.md +75 -0
- package/documents/pramanasutra/samples/missing-tests/report.html +29 -0
- package/documents/pramanasutra/samples/missing-tests/report.json +59 -0
- package/documents/pramanasutra/samples/missing-tests/report.md +75 -0
- package/documents/pramanasutra/samples/multi-language/report.html +33 -0
- package/documents/pramanasutra/samples/multi-language/report.json +116 -0
- package/documents/pramanasutra/samples/multi-language/report.md +110 -0
- package/documents/pramanasutra/samples/unsafe-names/report.html +29 -0
- package/documents/pramanasutra/samples/unsafe-names/report.json +61 -0
- package/documents/pramanasutra/samples/unsafe-names/report.md +75 -0
- package/examples/dotnet-app/README.md +3 -0
- package/examples/evidence/passing.json +12 -0
- package/examples/java-service/README.md +3 -0
- package/examples/mobile/README.md +3 -0
- package/examples/python-api/README.md +3 -0
- package/examples/release-policy/README.md +3 -0
- package/examples/sample-app/README.md +3 -0
- package/examples/sample-app/package.json +8 -0
- package/examples/sample-app/src/math.js +1 -0
- package/examples/sample-app/tests/math.test.js +5 -0
- package/examples/sample-output/clean-project/report.html +29 -0
- package/examples/sample-output/clean-project/report.json +45 -0
- package/examples/sample-output/clean-project/report.md +67 -0
- package/examples/sample-output/focused-test/report.html +29 -0
- package/examples/sample-output/focused-test/report.json +60 -0
- package/examples/sample-output/focused-test/report.md +74 -0
- package/examples/sample-output/missing-ci/report.html +29 -0
- package/examples/sample-output/missing-ci/report.json +59 -0
- package/examples/sample-output/missing-ci/report.md +75 -0
- package/examples/sample-output/missing-tests/report.html +29 -0
- package/examples/sample-output/missing-tests/report.json +59 -0
- package/examples/sample-output/missing-tests/report.md +75 -0
- package/examples/sample-output/multi-language/report.html +33 -0
- package/examples/sample-output/multi-language/report.json +116 -0
- package/examples/sample-output/multi-language/report.md +110 -0
- package/examples/sample-output/unsafe-names/report.html +29 -0
- package/examples/sample-output/unsafe-names/report.json +61 -0
- package/examples/sample-output/unsafe-names/report.md +75 -0
- package/llms.txt +60 -0
- package/package.json +65 -4
- package/packages/cli/bin/pramanasutra.mjs +90 -0
- package/packages/cli/lib/evidence.mjs +46 -0
- package/packages/cli/lib/installer.mjs +39 -0
- package/packages/cli/lib/policy.mjs +33 -0
- package/packages/cli/lib/report.mjs +169 -0
- package/packages/cli/lib/scanner.mjs +146 -0
- package/policies/recommended.json +11 -0
- package/policies/strict.json +12 -0
- package/templates/defect-report.md +11 -0
- package/templates/qa-strategy.md +9 -0
- package/templates/release-notes.md +9 -0
- package/templates/release-readiness.md +9 -0
- package/templates/rollback-plan.md +7 -0
- package/templates/test-evidence.json +11 -0
- package/templates/test-plan.md +4 -0
- package/templates/traceability-matrix.csv +1 -0
- package/workflows/create-test-plan.md +9 -0
- package/workflows/implement-tests.md +9 -0
- package/workflows/inspect-project.md +9 -0
- package/workflows/investigate-failure.md +9 -0
- package/workflows/post-release-observability.md +9 -0
- package/workflows/release-readiness.md +9 -0
- package/workflows/verify-regression.md +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,67 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pramanasutra",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.3.2",
|
|
4
|
+
"description": "PramanaSutra AI: open-source AI QA, test automation and release-readiness agent skills for Claude Code, Cursor, Codex, GitHub Copilot and Gemini CLI, plus a keyless, offline, evidence-first CLI.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"qa",
|
|
7
|
+
"quality-assurance",
|
|
8
|
+
"test-automation",
|
|
9
|
+
"release-engineering",
|
|
10
|
+
"release-readiness",
|
|
11
|
+
"quality-gate",
|
|
12
|
+
"ai-agent",
|
|
13
|
+
"agent-skills",
|
|
14
|
+
"claude-code",
|
|
15
|
+
"cursor",
|
|
16
|
+
"codex",
|
|
17
|
+
"github-copilot",
|
|
18
|
+
"gemini-cli",
|
|
19
|
+
"flaky-tests",
|
|
20
|
+
"regression-testing",
|
|
21
|
+
"ci-cd",
|
|
22
|
+
"sdet",
|
|
23
|
+
"llm"
|
|
24
|
+
],
|
|
25
|
+
"license": "Apache-2.0",
|
|
26
|
+
"author": "Vatsal Shah",
|
|
27
|
+
"homepage": "https://github.com/shahvatsalofficial/pramanasutra-ai#readme",
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "git+https://github.com/shahvatsalofficial/pramanasutra-ai.git"
|
|
31
|
+
},
|
|
32
|
+
"bugs": {
|
|
33
|
+
"url": "https://github.com/shahvatsalofficial/pramanasutra-ai/issues"
|
|
34
|
+
},
|
|
35
|
+
"type": "module",
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=20"
|
|
38
|
+
},
|
|
39
|
+
"bin": {
|
|
40
|
+
"pramanasutra": "packages/cli/bin/pramanasutra.mjs"
|
|
41
|
+
},
|
|
42
|
+
"files": [
|
|
43
|
+
"packages/cli",
|
|
44
|
+
".agents",
|
|
45
|
+
".claude",
|
|
46
|
+
"policies",
|
|
47
|
+
"templates",
|
|
48
|
+
"workflows",
|
|
49
|
+
"docs",
|
|
50
|
+
"documents",
|
|
51
|
+
"examples",
|
|
52
|
+
"README.md",
|
|
53
|
+
"LICENSE",
|
|
54
|
+
"NOTICE",
|
|
55
|
+
"llms.txt",
|
|
56
|
+
"CHANGELOG.md"
|
|
57
|
+
],
|
|
58
|
+
"scripts": {
|
|
59
|
+
"test": "node --test tests/cli.test.mjs",
|
|
60
|
+
"proof": "node scripts/generate-proof.mjs",
|
|
61
|
+
"docs": "node scripts/build-docs.mjs",
|
|
62
|
+
"gate": "node scripts/ci-gate.mjs",
|
|
63
|
+
"doctor": "node packages/cli/bin/pramanasutra.mjs doctor",
|
|
64
|
+
"scan:example": "node packages/cli/bin/pramanasutra.mjs scan --path examples/sample-app --out reports/example",
|
|
65
|
+
"gate:example": "node packages/cli/bin/pramanasutra.mjs release-check --path examples/sample-app --out reports/example"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { scanProject, evaluateGate } from '../lib/scanner.mjs';
|
|
5
|
+
import { loadPolicy } from '../lib/policy.mjs';
|
|
6
|
+
import { loadEvidence } from '../lib/evidence.mjs';
|
|
7
|
+
import { writeReports } from '../lib/report.mjs';
|
|
8
|
+
import { supportedIdes, listAgents, installSkills } from '../lib/installer.mjs';
|
|
9
|
+
|
|
10
|
+
const VERSION = (() => { try { return JSON.parse(fs.readFileSync(new URL('../../../package.json', import.meta.url), 'utf8')).version; } catch { return 'unknown'; } })();
|
|
11
|
+
const HELP = `PramanaSutra AI v${VERSION} — evidence-first QA & release review (by Vatsal Shah)
|
|
12
|
+
Usage:
|
|
13
|
+
pramanasutra version
|
|
14
|
+
pramanasutra doctor [--json]
|
|
15
|
+
pramanasutra agents list [--json]
|
|
16
|
+
pramanasutra scan --path <dir> [--out <dir>] [--no-report] [--json]
|
|
17
|
+
pramanasutra release-check --path <dir> [--evidence <file>] [--policy <file>] [--out <dir>] [--no-report] [--json]
|
|
18
|
+
pramanasutra verify --evidence <file> [--json]
|
|
19
|
+
pramanasutra init --ide <${supportedIdes.join('|')}|all> --target <existing-dir> [--force]
|
|
20
|
+
pramanasutra help
|
|
21
|
+
|
|
22
|
+
Exit codes: 0 success or READY_FOR_HUMAN_APPROVAL; 1 invalid input/error; 2 NO_GO; 3 REVIEW_REQUIRED.
|
|
23
|
+
Every scan and release-check writes three files together: report.md and report.html for people, report.json for tools.
|
|
24
|
+
Default directory: ./pramanasutra-reports. Change it with --out. Skip files with --no-report.
|
|
25
|
+
Static audit NEVER executes project tests. No additional AI key required.`;
|
|
26
|
+
const OPTION_VALUE = new Set(['--path','--out','--ide','--target','--evidence','--policy']);
|
|
27
|
+
const OPTION_FLAG = new Set(['--force','--json','--no-report']);
|
|
28
|
+
function parse(raw) {
|
|
29
|
+
const flags={}; const words=[];
|
|
30
|
+
for(let i=0;i<raw.length;i++) {
|
|
31
|
+
const word=raw[i];
|
|
32
|
+
if(OPTION_FLAG.has(word)) {flags[word.slice(2)]=true;continue;}
|
|
33
|
+
if(OPTION_VALUE.has(word)) {
|
|
34
|
+
if(!raw[i+1] || raw[i+1].startsWith('--')) throw new Error(`Missing value for ${word}`);
|
|
35
|
+
flags[word.slice(2)]=raw[++i];continue;
|
|
36
|
+
}
|
|
37
|
+
if(word==='--help'||word==='-h'||word==='--version'||word==='-v') { words.push(word); continue; }
|
|
38
|
+
if(word.startsWith('-')) throw new Error(`Unknown option: ${word}`);
|
|
39
|
+
words.push(word);
|
|
40
|
+
}
|
|
41
|
+
return { flags, words };
|
|
42
|
+
}
|
|
43
|
+
function emit(value, json=false) { if(json) console.log(JSON.stringify(value,null,2)); else if(typeof value==='string') console.log(value); else console.log(JSON.stringify(value,null,2)); }
|
|
44
|
+
export function main(rawArgs=process.argv.slice(2)) {
|
|
45
|
+
try {
|
|
46
|
+
const { flags, words }=parse(rawArgs);
|
|
47
|
+
const command=words[0] || 'help';
|
|
48
|
+
if(command==='help' || command==='--help' || command==='-h') {console.log(HELP);return 0;}
|
|
49
|
+
if(command==='version' || command==='--version' || command==='-v') {emit(flags.json?{product:'PramanaSutra AI',version:VERSION}:`PramanaSutra AI ${VERSION}`,!!flags.json);return 0;}
|
|
50
|
+
if(command==='doctor') {
|
|
51
|
+
const major=Number(process.versions.node.split('.')[0]);
|
|
52
|
+
const obj={product:'PramanaSutra AI',version:VERSION,node:process.version,platform:process.platform,ok:major>=20,offline:true,aiInference:false,root:process.cwd()};
|
|
53
|
+
emit(flags.json?obj:`PramanaSutra doctor: v${VERSION}, Node ${process.version}, ${process.platform}. ${obj.ok?'Ready for offline static QA.':'Node 20+ required.'} No additional AI key needed.`,!!flags.json);
|
|
54
|
+
return obj.ok?0:1;
|
|
55
|
+
}
|
|
56
|
+
if(command==='agents' && words[1]==='list') {const value=listAgents(); emit(flags.json?value:value.map(s=>' - '+s).join('\n'));return 0;}
|
|
57
|
+
if(command==='init') {
|
|
58
|
+
if(!flags.ide || !flags.target) throw new Error('Use init --ide <name> --target <existing-directory>');
|
|
59
|
+
const result=installSkills({ide:flags.ide,target:flags.target,force:!!flags.force});
|
|
60
|
+
emit(flags.json?result:`Installed ${result.count} skill directories into ${result.targets.join(', ')}. No AI model called.`,!!flags.json);
|
|
61
|
+
return 0;
|
|
62
|
+
}
|
|
63
|
+
if(command==='verify') {
|
|
64
|
+
if(!flags.evidence) throw new Error('Use verify --evidence <file>');
|
|
65
|
+
const ev=loadEvidence(flags.evidence);
|
|
66
|
+
emit(flags.json?ev:`Evidence valid: source=${ev.source}, passed=${ev.passed}, failed=${ev.failed}, exitCode=${ev.exitCode}. Provenance is only as trustworthy as its source.`,!!flags.json);
|
|
67
|
+
return 0;
|
|
68
|
+
}
|
|
69
|
+
if(command==='scan' || command==='release-check') {
|
|
70
|
+
if(!flags.path) throw new Error(`Use ${command} --path <existing directory>`);
|
|
71
|
+
if(command==='scan' && (flags.evidence||flags.policy)) throw new Error('--evidence and --policy apply to release-check only');
|
|
72
|
+
const report=scanProject(flags.path);
|
|
73
|
+
const evidence=flags.evidence && command==='release-check' ? loadEvidence(flags.evidence) : null;
|
|
74
|
+
report.releaseGate=evaluateGate(report,evidence,loadPolicy(flags.policy));
|
|
75
|
+
if(evidence) {
|
|
76
|
+
report.capabilities.testExecution='evidence-supplied';
|
|
77
|
+
report.evidence={source:evidence.source,command:evidence.command,executedAt:evidence.executedAt,exitCode:evidence.exitCode,passed:evidence.passed,failed:evidence.failed,skipped:evidence.skipped,environment:evidence.environment,commit:evidence.commit};
|
|
78
|
+
}
|
|
79
|
+
const outputs=flags['no-report']?[]:writeReports(report,flags.out||'pramanasutra-reports');
|
|
80
|
+
if(flags.json) emit(report,true);
|
|
81
|
+
else console.log(`PramanaSutra ${command}: ${report.inventory.fileCount} file(s), ${report.inventory.testFiles.length} test file(s), ${report.findings.length} finding(s). Gate: ${report.releaseGate.decision}. Tests executed by this tool: NO. Evidence: ${report.releaseGate.evidenceState}.\n${outputs.length?'Reports (Markdown, HTML, JSON): '+outputs.join(', '):'Reports not written (--no-report).'}`);
|
|
82
|
+
return command==='release-check' ? ({NO_GO:2,REVIEW_REQUIRED:3}[report.releaseGate.decision]??0) : 0;
|
|
83
|
+
}
|
|
84
|
+
throw new Error(`Unknown command: ${words.join(' ')}`);
|
|
85
|
+
} catch(err) {
|
|
86
|
+
console.error(`PramanaSutra error: ${err.message}`);
|
|
87
|
+
return 1;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
process.exitCode=main();
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
|
|
4
|
+
const SOURCES = new Set(['local-executed', 'ci-ingested', 'external-unverified']);
|
|
5
|
+
const MAX_EVIDENCE_BYTES = 1_000_000;
|
|
6
|
+
const count = (v) => Number.isInteger(v) && v >= 0;
|
|
7
|
+
|
|
8
|
+
export function loadEvidence(file) {
|
|
9
|
+
const resolved = path.resolve(file);
|
|
10
|
+
const info = fs.lstatSync(resolved);
|
|
11
|
+
if (!info.isFile() || info.isSymbolicLink()) throw new Error('--evidence must be a regular file (not a symlink)');
|
|
12
|
+
if (info.size > MAX_EVIDENCE_BYTES) throw new Error(`Evidence file exceeds ${MAX_EVIDENCE_BYTES} bytes`);
|
|
13
|
+
let data;
|
|
14
|
+
try { data = JSON.parse(fs.readFileSync(resolved, 'utf8')); }
|
|
15
|
+
catch (e) { throw new Error(`Evidence is not valid JSON: ${e.message}`); }
|
|
16
|
+
return validateEvidence(data);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function validateEvidence(data) {
|
|
20
|
+
const errors = [];
|
|
21
|
+
if (!data || typeof data !== 'object' || Array.isArray(data)) throw new Error('Evidence must be a JSON object');
|
|
22
|
+
if (data.schemaVersion !== '1.0.0') errors.push('schemaVersion must be "1.0.0"');
|
|
23
|
+
if (!SOURCES.has(data.source)) errors.push(`source must be one of: ${[...SOURCES].join(', ')}`);
|
|
24
|
+
if (typeof data.command !== 'string' || !data.command.trim()) errors.push('command must be a non-empty string');
|
|
25
|
+
if (typeof data.executedAt !== 'string' || Number.isNaN(Date.parse(data.executedAt))) errors.push('executedAt must be an ISO-8601 timestamp');
|
|
26
|
+
if (!Number.isInteger(data.exitCode)) errors.push('exitCode must be an integer');
|
|
27
|
+
if (!count(data.passed)) errors.push('passed must be a non-negative integer');
|
|
28
|
+
if (!count(data.failed)) errors.push('failed must be a non-negative integer');
|
|
29
|
+
if (data.skipped !== undefined && !count(data.skipped)) errors.push('skipped must be a non-negative integer when present');
|
|
30
|
+
if (errors.length) throw new Error(`Invalid evidence: ${errors.join('; ')}`);
|
|
31
|
+
return {
|
|
32
|
+
schemaVersion: data.schemaVersion, source: data.source, command: data.command, executedAt: data.executedAt,
|
|
33
|
+
exitCode: data.exitCode, passed: data.passed, failed: data.failed, skipped: data.skipped ?? 0,
|
|
34
|
+
environment: typeof data.environment === 'string' ? data.environment : null,
|
|
35
|
+
commit: typeof data.commit === 'string' ? data.commit : null
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Summarize evidence for the gate. Only `local-executed` and `ci-ingested` evidence can count as verified. */
|
|
40
|
+
export function classifyEvidence(evidence) {
|
|
41
|
+
if (!evidence) return { state: 'absent', reasons: ['No executed-test evidence supplied (use --evidence).'] };
|
|
42
|
+
if (evidence.failed > 0 || evidence.exitCode !== 0) return { state: 'failing', reasons: [`Supplied test evidence reports ${evidence.failed} failure(s), exit code ${evidence.exitCode}.`] };
|
|
43
|
+
if (evidence.passed === 0) return { state: 'inconclusive', reasons: ['Supplied evidence reports zero passed tests.'] };
|
|
44
|
+
if (evidence.source === 'external-unverified') return { state: 'unverified', reasons: ['Evidence source is external-unverified; provenance is not established.'] };
|
|
45
|
+
return { state: 'passing', reasons: [] };
|
|
46
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
|
|
5
|
+
const REPO = path.resolve(path.dirname(fileURLToPath(import.meta.url)),'../../../');
|
|
6
|
+
const SOURCE = path.join(REPO,'.agents','skills');
|
|
7
|
+
const ADAPTERS = { claude:'.claude/skills', cursor:'.cursor/skills', codex:'.agents/skills', gemini:'.gemini/skills', copilot:'.github/skills', generic:'.agents/skills' };
|
|
8
|
+
export const supportedIdes = Object.keys(ADAPTERS);
|
|
9
|
+
export function listAgents() {return fs.readdirSync(SOURCE,{withFileTypes:true}).filter(x=>x.isDirectory() && fs.existsSync(path.join(SOURCE,x.name,'SKILL.md'))).map(x=>x.name).sort();}
|
|
10
|
+
export function installSkills({ide,target,force=false}) {
|
|
11
|
+
if (!ide || !target) throw new Error('init requires --ide and --target');
|
|
12
|
+
if (ide!=='all' && !(ide in ADAPTERS)) throw new Error(`Unsupported IDE: ${ide}. Choices: ${Object.keys(ADAPTERS).join(', ')}, all`);
|
|
13
|
+
const base=path.resolve(target);
|
|
14
|
+
if (!fs.existsSync(base) || !fs.lstatSync(base).isDirectory() || fs.lstatSync(base).isSymbolicLink()) throw new Error('--target must be an existing real directory');
|
|
15
|
+
const targets=[...new Set((ide==='all' ? Object.values(ADAPTERS):[ADAPTERS[ide]]))];
|
|
16
|
+
const skills=listAgents();
|
|
17
|
+
const actions=[];
|
|
18
|
+
for(const adapter of targets) for(const skill of skills) {
|
|
19
|
+
const dest=path.join(base,adapter,skill);
|
|
20
|
+
const source=path.join(SOURCE,skill);
|
|
21
|
+
// No symlink components in destination path: don't copy to surprising locations.
|
|
22
|
+
let cursor=base;
|
|
23
|
+
for(const segment of (adapter+'/'+skill).split('/')) {
|
|
24
|
+
cursor=path.join(cursor,segment);
|
|
25
|
+
if (fs.existsSync(cursor) && fs.lstatSync(cursor).isSymbolicLink()) throw new Error(`Refusing symlink target path: ${cursor}`);
|
|
26
|
+
}
|
|
27
|
+
if (fs.existsSync(dest) && !force && path.resolve(dest) !== path.resolve(source)) throw new Error(`Skill already exists: ${dest} (use --force only after review)`);
|
|
28
|
+
actions.push({source,dest,existing:fs.existsSync(dest)});
|
|
29
|
+
}
|
|
30
|
+
const installed=[];
|
|
31
|
+
for(const {source,dest,existing} of actions) {
|
|
32
|
+
if (path.resolve(dest) === path.resolve(source)) {installed.push(dest);continue;}
|
|
33
|
+
fs.mkdirSync(path.dirname(dest),{recursive:true});
|
|
34
|
+
if (existing) fs.rmSync(dest,{recursive:true,force:true});
|
|
35
|
+
fs.cpSync(source,dest,{recursive:true});
|
|
36
|
+
installed.push(dest);
|
|
37
|
+
}
|
|
38
|
+
return {count:installed.length,targets,installed};
|
|
39
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
|
|
4
|
+
export const DEFAULT_POLICY = Object.freeze({
|
|
5
|
+
name: 'recommended', releaseRequiresExecutedEvidence: true, blockOnFocusedTests: true,
|
|
6
|
+
blockOnSkippedTests: false, requireCi: true, requireLicense: true, requireTests: true
|
|
7
|
+
});
|
|
8
|
+
const BOOLEAN_KEYS = ['releaseRequiresExecutedEvidence', 'blockOnFocusedTests', 'blockOnSkippedTests', 'requireCi', 'requireLicense', 'requireTests'];
|
|
9
|
+
// Keys that exist for documentation/forward-compat. Their value is only accepted if safe.
|
|
10
|
+
const FIXED_KEYS = { schemaVersion: '1.0.0', allowAutomatedDeployment: false, manualApprovalsRequired: true };
|
|
11
|
+
const MAX_POLICY_BYTES = 100_000;
|
|
12
|
+
|
|
13
|
+
/** Fail-closed policy loader: unknown keys, wrong types, symlinks and unsafe values are rejected. */
|
|
14
|
+
export function loadPolicy(file) {
|
|
15
|
+
if (!file) return { ...DEFAULT_POLICY };
|
|
16
|
+
const resolved = path.resolve(file);
|
|
17
|
+
const info = fs.lstatSync(resolved);
|
|
18
|
+
if (!info.isFile() || info.isSymbolicLink()) throw new Error('--policy must be a regular file (not a symlink)');
|
|
19
|
+
if (info.size > MAX_POLICY_BYTES) throw new Error('Policy file is too large');
|
|
20
|
+
let data;
|
|
21
|
+
try { data = JSON.parse(fs.readFileSync(resolved, 'utf8')); } catch (e) { throw new Error(`Policy is not valid JSON: ${e.message}`); }
|
|
22
|
+
if (!data || typeof data !== 'object' || Array.isArray(data)) throw new Error('Policy must be a JSON object');
|
|
23
|
+
const errors = [];
|
|
24
|
+
const policy = { ...DEFAULT_POLICY };
|
|
25
|
+
for (const [key, value] of Object.entries(data)) {
|
|
26
|
+
if (key === 'name') { if (typeof value === 'string' && value.length <= 80) policy.name = value; else errors.push('name must be a string up to 80 chars'); }
|
|
27
|
+
else if (BOOLEAN_KEYS.includes(key)) { if (typeof value === 'boolean') policy[key] = value; else errors.push(`${key} must be a boolean`); }
|
|
28
|
+
else if (key in FIXED_KEYS) { if (value !== FIXED_KEYS[key]) errors.push(`${key} must be ${JSON.stringify(FIXED_KEYS[key])} (cannot be weakened)`); }
|
|
29
|
+
else errors.push(`unknown key: ${key}`);
|
|
30
|
+
}
|
|
31
|
+
if (errors.length) throw new Error(`Invalid policy: ${errors.join('; ')}`);
|
|
32
|
+
return policy;
|
|
33
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
|
|
4
|
+
export const escapeHtml = (value) => String(value).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''');
|
|
5
|
+
const escMd = (value) => String(value).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/\|/g, '\\|').replace(/\r?\n/g, ' ').replace(/`/g, '\\`');
|
|
6
|
+
const SEVERITIES = ['critical', 'high', 'medium', 'low', 'info'];
|
|
7
|
+
const loc = (f) => `${f.evidence.path}${f.evidence.line ? ':' + f.evidence.line : ''}`;
|
|
8
|
+
const sevCounts = (report) => Object.fromEntries(SEVERITIES.map(s => [s, report.findings.filter(f => f.severity === s).length]));
|
|
9
|
+
const GATE_TEXT = {
|
|
10
|
+
NO_GO: 'Blocking issue found. Do not release until it is fixed and re-checked.',
|
|
11
|
+
REVIEW_REQUIRED: 'Evidence is missing or incomplete. A human must review before any release decision.',
|
|
12
|
+
READY_FOR_HUMAN_APPROVAL: 'All policy checks passed. A human must still approve; this is never a deploy order.'
|
|
13
|
+
};
|
|
14
|
+
const NOT_RUN = 'Tests executed by PramanaSutra: NO (static scan only). Executed-test results count only when supplied as evidence.';
|
|
15
|
+
const LIMITS = [
|
|
16
|
+
'Heuristic checks do not prove the absence of bugs or release readiness.',
|
|
17
|
+
'No target tests, security scanners, browser, load tests or deploy checks were run by this tool.',
|
|
18
|
+
'This report is decision support, not a compliance certification or legal advice.'
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
function listOrNote(items, empty) {
|
|
22
|
+
if (!items.length) return [empty, ''];
|
|
23
|
+
const shown = items.slice(0, 40).map(x => `- \`${escMd(x)}\``);
|
|
24
|
+
if (items.length > 40) shown.push(`- … ${items.length - 40} more not listed.`);
|
|
25
|
+
return [...shown, ''];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function markdown(report) {
|
|
29
|
+
const gate = report.releaseGate;
|
|
30
|
+
const c = sevCounts(report);
|
|
31
|
+
const ev = report.evidence || null;
|
|
32
|
+
const L = [];
|
|
33
|
+
L.push('# PramanaSutra AI: QA & Release Audit Report', '');
|
|
34
|
+
L.push('This audit is three files with the same facts: **report.md** (this file), **report.html** (open in a browser) and **report.json** (for CI). A static finding is text the scanner saw. It is not a test PramanaSutra ran.', '');
|
|
35
|
+
L.push('| | |', '|---|---|');
|
|
36
|
+
L.push(`| Project | \`${escMd(report.scannedPath)}\` |`);
|
|
37
|
+
L.push(`| Generated | ${escMd(report.generatedAt)} |`);
|
|
38
|
+
L.push(`| Tool | PramanaSutra AI ${escMd(report.toolVersion || '')} (schema ${escMd(report.schemaVersion)}) |`);
|
|
39
|
+
L.push(`| **Release decision** | **${gate ? gate.decision : 'Not evaluated'}** |`);
|
|
40
|
+
if (gate) L.push(`| Policy | ${escMd(gate.policy)} |`, `| Supplied test evidence | ${escMd(gate.evidenceState)} |`);
|
|
41
|
+
L.push('');
|
|
42
|
+
if (gate) L.push(`> **${gate.decision}.** ${GATE_TEXT[gate.decision]}`, '');
|
|
43
|
+
L.push('## Summary', '', `- Files inspected: ${report.inventory.fileCount}`, `- Test files detected: ${report.inventory.testFiles.length}`, `- CI workflows detected: ${report.inventory.ciWorkflows.length}`, `- Manifests detected: ${report.inventory.manifests.length}`, `- Findings: ${report.findings.length} (${SEVERITIES.map(s => `${s} ${c[s]}`).join(', ')})`, `- ${NOT_RUN}`, '');
|
|
44
|
+
L.push('## Supplied test evidence', '');
|
|
45
|
+
if (!ev) {
|
|
46
|
+
L.push('No evidence file was supplied. Counts below are not test results. The release gate cannot treat the suite as passed.', '');
|
|
47
|
+
} else {
|
|
48
|
+
L.push('These numbers come from the evidence file the operator supplied. PramanaSutra did not run that command.', '');
|
|
49
|
+
L.push('| Field | Value |', '|---|---|');
|
|
50
|
+
L.push(`| Source | \`${escMd(ev.source)}\` |`);
|
|
51
|
+
L.push(`| Command | \`${escMd(ev.command)}\` |`);
|
|
52
|
+
L.push(`| Executed at | ${escMd(ev.executedAt)} |`);
|
|
53
|
+
L.push(`| Exit code | ${escMd(ev.exitCode)} |`);
|
|
54
|
+
L.push(`| Passed | ${escMd(ev.passed)} |`);
|
|
55
|
+
L.push(`| Failed | ${escMd(ev.failed)} |`);
|
|
56
|
+
L.push(`| Skipped | ${escMd(ev.skipped ?? 0)} |`);
|
|
57
|
+
if (ev.environment) L.push(`| Environment | ${escMd(ev.environment)} |`);
|
|
58
|
+
if (ev.commit) L.push(`| Commit | \`${escMd(ev.commit)}\` |`);
|
|
59
|
+
L.push('');
|
|
60
|
+
}
|
|
61
|
+
L.push('## Findings at a glance', '');
|
|
62
|
+
if (!report.findings.length) L.push('No static issues detected. This does **not** mean the project is release-ready; other checks were not run.', '');
|
|
63
|
+
else {
|
|
64
|
+
L.push('| Severity | Rule | Where | Fix |', '|---|---|---|---|');
|
|
65
|
+
for (const f of report.findings) L.push(`| ${f.severity} | \`${escMd(f.ruleId)}\` | \`${escMd(loc(f))}\` | ${escMd(f.recommendation)} |`);
|
|
66
|
+
L.push('');
|
|
67
|
+
}
|
|
68
|
+
L.push('## Findings', '');
|
|
69
|
+
if (!report.findings.length) L.push('None.', '');
|
|
70
|
+
for (const f of report.findings) {
|
|
71
|
+
L.push(`### ${escMd(f.title)}`, '', `- **Rule:** \`${escMd(f.ruleId)}\` | **Severity:** ${f.severity} | **Confidence:** ${f.confidence} | **Status:** ${f.status}`, `- **Where:** \`${escMd(loc(f))}\``, `- **Why it matters:** ${escMd(f.description)}`, `- **Fix:** ${escMd(f.recommendation)}`, '');
|
|
72
|
+
}
|
|
73
|
+
L.push('## Test files seen', '');
|
|
74
|
+
L.push(...listOrNote(report.inventory.testFiles, 'None. Either there are no tests, or they use a naming convention this scanner does not recognise.'));
|
|
75
|
+
L.push('## CI workflows seen', '');
|
|
76
|
+
L.push(...listOrNote(report.inventory.ciWorkflows, 'None recognised (GitHub Actions, GitLab CI, Jenkins, Azure Pipelines, Bitbucket Pipelines).'));
|
|
77
|
+
L.push('## Capabilities', '', '| Capability | State | What that means |', '|---|---|---|');
|
|
78
|
+
const capHelp = {
|
|
79
|
+
staticAudit: 'Source text was inspected with heuristic rules.',
|
|
80
|
+
testExecution: 'not-run means this tool did not execute tests. evidence-supplied means an evidence file was attached.',
|
|
81
|
+
browser: 'No browser was launched.',
|
|
82
|
+
securityScan: 'This is not a vulnerability scanner.',
|
|
83
|
+
performanceTest: 'No load or timing test was run.',
|
|
84
|
+
aiInference: 'The CLI did not call a model.'
|
|
85
|
+
};
|
|
86
|
+
for (const [k, v] of Object.entries(report.capabilities)) L.push(`| ${escMd(k)} | ${escMd(v)} | ${escMd(capHelp[k] || '')} |`);
|
|
87
|
+
L.push('', '## Release gate reasons', '');
|
|
88
|
+
for (const r of (gate ? gate.reasons : ['Not requested'])) L.push(`- ${escMd(r)}`);
|
|
89
|
+
L.push('', '## Limitations', '');
|
|
90
|
+
for (const lim of [...report.limitations, ...LIMITS]) L.push(`- ${escMd(lim)}`);
|
|
91
|
+
L.push('', '---', '*Created by Vatsal Shah. Generated locally; nothing was sent over the network. Same audit: report.html and report.json.*', '');
|
|
92
|
+
return L.join('\n');
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const CSS = `:root{--bg:#f4f1ea;--card:#fffcf7;--ink:#1c1915;--mut:#5c564c;--line:#e4ddd0;--ac:#0f3d3e;--ok:#166534;--warn:#92400e;--bad:#991b1b}
|
|
96
|
+
@media(prefers-color-scheme:dark){:root{--bg:#121410;--card:#1c1f1a;--ink:#f3efe6;--mut:#c4bbaa;--line:#34382f;--ac:#8ec9c4;--ok:#86efac;--warn:#fbbf24;--bad:#fca5a5}}
|
|
97
|
+
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:17px/1.6 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
|
|
98
|
+
main{max-width:980px;margin:0 auto;padding:1.5rem 1rem 4rem}h1{font-size:clamp(1.6rem,3vw,2.1rem);line-height:1.2;margin:.2rem 0 .4rem}h2{margin-top:2.2rem;font-size:1.25rem}
|
|
99
|
+
.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:1.1rem 1.25rem;margin:1rem 0}
|
|
100
|
+
.banner{border-left:6px solid var(--ac)}.NO_GO{border-color:var(--bad)}.REVIEW_REQUIRED{border-color:var(--warn)}.READY_FOR_HUMAN_APPROVAL{border-color:var(--ok)}
|
|
101
|
+
.pill{display:inline-block;padding:.12rem .7rem;border-radius:999px;font-weight:700;font-size:.85rem;border:1px solid currentColor}
|
|
102
|
+
.pill.NO_GO,.pill.critical,.pill.high{color:var(--bad)}.pill.REVIEW_REQUIRED,.pill.medium{color:var(--warn)}.pill.READY_FOR_HUMAN_APPROVAL{color:var(--ok)}.pill.low,.pill.info{color:var(--mut)}
|
|
103
|
+
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:.75rem}.stat b{display:block;font-size:1.6rem;line-height:1.2}.stat span{color:var(--mut);font-size:.88rem}
|
|
104
|
+
table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:.5rem .55rem;border-bottom:1px solid var(--line);vertical-align:top}th{color:var(--mut);font-size:.8rem;letter-spacing:.03em}
|
|
105
|
+
code{font-family:ui-monospace,Consolas,monospace;background:var(--bg);padding:.05rem .35rem;border-radius:5px;overflow-wrap:anywhere}
|
|
106
|
+
.muted{color:var(--mut)}footer{margin-top:2.5rem;color:var(--mut);font-size:.9rem}a{color:var(--ac)}:focus-visible{outline:3px solid var(--ac);outline-offset:2px}
|
|
107
|
+
.skip{position:absolute;left:-999px;top:.4rem;background:var(--ac);color:#fff;padding:.4rem .7rem;z-index:2}.skip:focus{left:.4rem}
|
|
108
|
+
@media(prefers-color-scheme:dark){.skip{color:#10201f}}
|
|
109
|
+
@media print{body{background:#fff;color:#000}.card{break-inside:avoid}.skip{display:none}}
|
|
110
|
+
@media(max-width:640px){body{font-size:16px}}`;
|
|
111
|
+
|
|
112
|
+
export function html(report) {
|
|
113
|
+
const gate = report.releaseGate;
|
|
114
|
+
const c = sevCounts(report);
|
|
115
|
+
const e = escapeHtml;
|
|
116
|
+
const ev = report.evidence || null;
|
|
117
|
+
const row = (cells) => `<tr>${cells.map(x => `<td>${x}</td>`).join('')}</tr>`;
|
|
118
|
+
const glance = report.findings.map(f => row([`<span class="pill ${e(f.severity)}">${e(f.severity)}</span>`, `<code>${e(f.ruleId)}</code>`, `<code>${e(loc(f))}</code>`, e(f.recommendation)])).join('');
|
|
119
|
+
const cards = report.findings.map(f => `<article class="card"><h3 style="margin:.1rem 0"><span class="pill ${e(f.severity)}">${e(f.severity)}</span> ${e(f.title)}</h3><p class="muted">Rule <code>${e(f.ruleId)}</code> · confidence ${e(f.confidence)} · ${e(f.status)} · <code>${e(loc(f))}</code></p><p><strong>Why it matters:</strong> ${e(f.description)}</p><p><strong>Fix:</strong> ${e(f.recommendation)}</p></article>`).join('\n');
|
|
120
|
+
const capHelp = {
|
|
121
|
+
staticAudit: 'Source text was inspected with heuristic rules.',
|
|
122
|
+
testExecution: 'not-run means this tool did not execute tests. evidence-supplied means an evidence file was attached.',
|
|
123
|
+
browser: 'No browser was launched.',
|
|
124
|
+
securityScan: 'This is not a vulnerability scanner.',
|
|
125
|
+
performanceTest: 'No load or timing test was run.',
|
|
126
|
+
aiInference: 'The CLI did not call a model.'
|
|
127
|
+
};
|
|
128
|
+
const caps = Object.entries(report.capabilities).map(([k, v]) => `<tr><th scope="row">${e(k)}</th><td><code>${e(v)}</code></td><td>${e(capHelp[k] || '')}</td></tr>`).join('');
|
|
129
|
+
const reasons = (gate ? gate.reasons : ['Not requested']).map(x => `<li>${e(x)}</li>`).join('');
|
|
130
|
+
const lims = [...report.limitations, ...LIMITS].map(x => `<li>${e(x)}</li>`).join('');
|
|
131
|
+
const stat = (n, label) => `<div class="stat card"><b>${e(n)}</b><span>${e(label)}</span></div>`;
|
|
132
|
+
const fileList = (items, empty) => items.length ? `<ul>${items.slice(0, 40).map(x => `<li><code>${e(x)}</code></li>`).join('')}${items.length > 40 ? `<li>… ${e(items.length - 40)} more not listed.</li>` : ''}</ul>` : `<p>${e(empty)}</p>`;
|
|
133
|
+
const evidence = !ev
|
|
134
|
+
? '<p>No evidence file was supplied. Counts on this page are not test results. The release gate cannot treat the suite as passed.</p>'
|
|
135
|
+
: `<p>These numbers come from the evidence file the operator supplied. PramanaSutra did not run that command.</p><table><tbody>
|
|
136
|
+
<tr><th scope="row">Source</th><td><code>${e(ev.source)}</code></td></tr>
|
|
137
|
+
<tr><th scope="row">Command</th><td><code>${e(ev.command)}</code></td></tr>
|
|
138
|
+
<tr><th scope="row">Executed at</th><td>${e(ev.executedAt)}</td></tr>
|
|
139
|
+
<tr><th scope="row">Exit code</th><td>${e(ev.exitCode)}</td></tr>
|
|
140
|
+
<tr><th scope="row">Passed</th><td>${e(ev.passed)}</td></tr>
|
|
141
|
+
<tr><th scope="row">Failed</th><td>${e(ev.failed)}</td></tr>
|
|
142
|
+
<tr><th scope="row">Skipped</th><td>${e(ev.skipped ?? 0)}</td></tr>
|
|
143
|
+
${ev.environment ? `<tr><th scope="row">Environment</th><td>${e(ev.environment)}</td></tr>` : ''}
|
|
144
|
+
${ev.commit ? `<tr><th scope="row">Commit</th><td><code>${e(ev.commit)}</code></td></tr>` : ''}
|
|
145
|
+
</tbody></table>`;
|
|
146
|
+
return `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="color-scheme" content="light dark"><meta name="description" content="PramanaSutra AI QA and release audit report. Decision support, not a certification."><title>PramanaSutra AI QA & Release Audit Report</title><style>${CSS}</style></head><body><a class="skip" href="#content">Skip to content</a><main id="content">
|
|
147
|
+
<p class="muted">PramanaSutra AI · QA & Release Audit · Markdown, HTML and JSON are the same audit</p><h1>${e(report.scannedPath)}</h1><p class="muted">Generated ${e(report.generatedAt)} · schema ${e(report.schemaVersion)} · tool ${e(report.toolVersion || '')}</p>
|
|
148
|
+
${gate ? `<section class="card banner ${e(gate.decision)}" role="status"><p class="muted" style="margin:0">Release decision</p><p style="margin:.35rem 0"><span class="pill ${e(gate.decision)}">${e(gate.decision)}</span></p><p style="margin:.4rem 0 0">${e(GATE_TEXT[gate.decision])}</p><p class="muted" style="margin:.35rem 0 0">Policy: ${e(gate.policy)} · Supplied test evidence: ${e(gate.evidenceState)}</p></section>` : '<p class="card">Release decision: not evaluated. This was a scan without a gate.</p>'}
|
|
149
|
+
<section class="grid" aria-label="Summary">${stat(report.inventory.fileCount, 'files inspected')}${stat(report.inventory.testFiles.length, 'test files')}${stat(report.inventory.ciWorkflows.length, 'CI workflows')}${stat(report.findings.length, 'findings')}${stat(c.critical + c.high, 'critical + high')}</section>
|
|
150
|
+
<p class="card"><strong>${e(NOT_RUN)}</strong></p>
|
|
151
|
+
<h2>Supplied test evidence</h2><div class="card">${evidence}</div>
|
|
152
|
+
<h2>Findings at a glance</h2>${report.findings.length ? `<div class="card" style="overflow-x:auto"><table><thead><tr><th>Severity</th><th>Rule</th><th>Where</th><th>Fix</th></tr></thead><tbody>${glance}</tbody></table></div>` : '<p class="card">No static issues detected. This does <strong>not</strong> mean the project is release-ready; other checks were not run.</p>'}
|
|
153
|
+
<h2>Findings</h2>${cards || '<p class="card">None.</p>'}
|
|
154
|
+
<h2>Test files seen</h2><div class="card">${fileList(report.inventory.testFiles, 'None. Either there are no tests, or they use a naming convention this scanner does not recognise.')}</div>
|
|
155
|
+
<h2>CI workflows seen</h2><div class="card">${fileList(report.inventory.ciWorkflows, 'None recognised (GitHub Actions, GitLab CI, Jenkins, Azure Pipelines, Bitbucket Pipelines).')}</div>
|
|
156
|
+
<h2>Release gate reasons</h2><div class="card"><ul>${reasons}</ul></div>
|
|
157
|
+
<h2>Capabilities</h2><div class="card" style="overflow-x:auto"><table><thead><tr><th>Capability</th><th>State</th><th>What that means</th></tr></thead><tbody>${caps}</tbody></table></div>
|
|
158
|
+
<h2>Limitations</h2><div class="card"><ul>${lims}</ul></div>
|
|
159
|
+
<footer>Created by Vatsal Shah. Generated locally; nothing was sent over the network. Not a compliance certification, a security test, or a release authorization. Open <code>report.md</code> for the same audit in Markdown.</footer></main></body></html>`;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export function writeReports(report, out) {
|
|
163
|
+
if (!out) return [];
|
|
164
|
+
const target = path.resolve(out);
|
|
165
|
+
fs.mkdirSync(target, { recursive: true });
|
|
166
|
+
const outputs = [['report.md', markdown(report)], ['report.html', html(report)], ['report.json', JSON.stringify(report, null, 2) + '\n']];
|
|
167
|
+
for (const [file, content] of outputs) fs.writeFileSync(path.join(target, file), content, 'utf8');
|
|
168
|
+
return outputs.map(([file]) => path.join(target, file));
|
|
169
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { classifyEvidence } from './evidence.mjs';
|
|
4
|
+
import { DEFAULT_POLICY } from './policy.mjs';
|
|
5
|
+
|
|
6
|
+
const SKIP_DIRS = new Set(['.git', 'node_modules', '.venv', 'venv', 'dist', 'build', 'target', 'coverage', '.next', '.nuxt', '.turbo', '.cache', 'reports', 'pramanasutra-reports', '.idea', '.gradle', 'vendor', 'bin', 'obj']);
|
|
7
|
+
const SOURCE_EXT = /\.(?:[cm]?[jt]sx?|py|go|rs|rb|php|java|kt|swift|dart|cs|vue|svelte)$/i;
|
|
8
|
+
const TEST_PATH = /(?:^|\/)(?:tests?|__tests__|specs?|e2e)(?:\/|$)|(?:\.test\.|\.spec\.|_test\.(?:go|py|rb|dart)|_spec\.rb$|(?:^|\/)test_[^/]*\.py$)/i;
|
|
9
|
+
const TEST_NAME = /[a-z0-9](?:Tests?|Spec|IT)\.(?:java|kt|cs|swift|scala|php|dart)$/;
|
|
10
|
+
const FOCUSED = /^\s*(?:(?:await\s+)?(?:describe|test|it)\.only\s*\(|(?:fit|fdescribe)\s*\()/;
|
|
11
|
+
const SKIPPED = /^\s*(?:(?:await\s+)?(?:describe|test|it)\.(?:skip|todo)\s*\(|(?:xit|xtest|xdescribe)\s*\()/;
|
|
12
|
+
const SKIPPED_ALT = /^\s*(?:@pytest\.mark\.(?:skip|xfail)|@unittest\.skip\w*|@Ignore\b|@Disabled\b|(?:\w+\.)?t\.Skip(?:Now)?\s*\(|pytest\.(?:skip|xfail)\s*\(|self\.skipTest\s*\(|raise\s+unittest\.SkipTest\b)/;
|
|
13
|
+
const MAX_DEPTH = 22;
|
|
14
|
+
const MAX_FILES = 20000;
|
|
15
|
+
const MAX_SOURCE_SIZE = 2_000_000;
|
|
16
|
+
|
|
17
|
+
function toolVersion() {
|
|
18
|
+
try { return JSON.parse(fs.readFileSync(new URL('../../../package.json', import.meta.url), 'utf8')).version; }
|
|
19
|
+
catch { return 'unknown'; }
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function finding(ruleId, severity, confidence, title, description, evidence, recommendation) {
|
|
23
|
+
return { id: `PS-${ruleId}-${String(evidence.line || 0).padStart(5,'0')}-${String(evidence.path || '').replace(/[^a-z0-9]/gi,'_').slice(-45)}`, ruleId, severity, confidence, title, description, evidence, recommendation, status: 'observed' };
|
|
24
|
+
}
|
|
25
|
+
function isTestFile(rel) { return TEST_PATH.test(rel) || TEST_NAME.test(rel); }
|
|
26
|
+
function loadIgnore(root) {
|
|
27
|
+
const file = path.join(root, '.pramanasutraignore');
|
|
28
|
+
let info;
|
|
29
|
+
try { info = fs.lstatSync(file); } catch { return []; }
|
|
30
|
+
if (!info.isFile() || info.isSymbolicLink()) throw new Error('.pramanasutraignore must be a regular file (not a symlink)');
|
|
31
|
+
if (info.size > 100_000) throw new Error('.pramanasutraignore is too large');
|
|
32
|
+
const rules = [];
|
|
33
|
+
for (const raw of fs.readFileSync(file, 'utf8').split(/\r?\n/)) {
|
|
34
|
+
const line = raw.trim();
|
|
35
|
+
if (!line || line.startsWith('#')) continue;
|
|
36
|
+
if (line.includes('..') || line.startsWith('/') || line.startsWith('\\') || line.includes('\0')) throw new Error(`Unsafe .pramanasutraignore entry: ${line}`);
|
|
37
|
+
rules.push(line.replace(/\\/g, '/').replace(/^\.\//, ''));
|
|
38
|
+
}
|
|
39
|
+
return rules;
|
|
40
|
+
}
|
|
41
|
+
function isIgnored(rel, rules) {
|
|
42
|
+
return rules.some((rule) => rule.endsWith('/') ? (rel === rule.slice(0, -1) || rel.startsWith(rule)) : (rel === rule || rel.startsWith(rule + '/')));
|
|
43
|
+
}
|
|
44
|
+
function existsFile(root, rel) {
|
|
45
|
+
try { return fs.statSync(path.join(root, rel)).isFile(); } catch { return false; }
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function scanProject(target) {
|
|
49
|
+
const targetPath = path.resolve(target);
|
|
50
|
+
const info = fs.lstatSync(targetPath);
|
|
51
|
+
if (!info.isDirectory() || info.isSymbolicLink()) throw new Error('Scan target must be a real directory (not a symlink)');
|
|
52
|
+
const entries = [];
|
|
53
|
+
const limitations = [];
|
|
54
|
+
let skippedSymlinks = 0;
|
|
55
|
+
let oversizedFiles = 0;
|
|
56
|
+
let binaryFiles = 0;
|
|
57
|
+
let ignoredPaths = 0;
|
|
58
|
+
let truncated = false;
|
|
59
|
+
const ignore = loadIgnore(targetPath);
|
|
60
|
+
const stack = [{ absolute: targetPath, depth: 0 }];
|
|
61
|
+
while (stack.length) {
|
|
62
|
+
const { absolute, depth } = stack.pop();
|
|
63
|
+
if (depth > MAX_DEPTH) { truncated = true; continue; }
|
|
64
|
+
let children;
|
|
65
|
+
try { children = fs.readdirSync(absolute, { withFileTypes: true }); }
|
|
66
|
+
catch (e) { limitations.push(`Unreadable directory: ${path.relative(targetPath, absolute) || '.'} (${e.code || 'error'})`); continue; }
|
|
67
|
+
children.sort((a,b)=>a.name.localeCompare(b.name));
|
|
68
|
+
for (const child of children) {
|
|
69
|
+
const full = path.join(absolute, child.name);
|
|
70
|
+
const rel = path.relative(targetPath, full).split(path.sep).join('/');
|
|
71
|
+
if (isIgnored(rel, ignore)) { ignoredPaths++; continue; }
|
|
72
|
+
if (child.isSymbolicLink()) { skippedSymlinks++; continue; }
|
|
73
|
+
if (child.isDirectory()) {
|
|
74
|
+
if (!SKIP_DIRS.has(child.name)) stack.push({ absolute: full, depth: depth + 1 });
|
|
75
|
+
} else if (child.isFile()) {
|
|
76
|
+
entries.push(path.relative(targetPath, full).split(path.sep).join('/'));
|
|
77
|
+
if (entries.length >= MAX_FILES) { truncated = true; stack.length = 0; break; }
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
entries.sort();
|
|
82
|
+
if (skippedSymlinks) limitations.push(`Skipped ${skippedSymlinks} symbolic link(s); they were not followed.`);
|
|
83
|
+
if (truncated) limitations.push('File/depth limit reached; scan is incomplete.');
|
|
84
|
+
const testFiles = entries.filter(isTestFile);
|
|
85
|
+
const findings = [];
|
|
86
|
+
const manifests = entries.filter(p => /(?:^|\/)(?:package\.json|pyproject\.toml|requirements\.txt|pom\.xml|build\.gradle(?:\.kts)?|Cargo\.toml|go\.mod|Gemfile|composer\.json|pubspec\.yaml|[^/]+\.sln|[^/]+\.csproj)$/.test(p));
|
|
87
|
+
const workflows = entries.filter(p => /^\.github\/workflows\/[^/]+\.ya?ml$/.test(p) || /(?:^|\/)(?:\.gitlab-ci\.yml|Jenkinsfile|azure-pipelines\.yml|bitbucket-pipelines\.yml)$/.test(p));
|
|
88
|
+
for (const rel of testFiles) {
|
|
89
|
+
if (!SOURCE_EXT.test(rel)) continue;
|
|
90
|
+
const full=path.join(targetPath,...rel.split('/'));
|
|
91
|
+
let size;
|
|
92
|
+
try { size=fs.statSync(full).size; } catch { continue; }
|
|
93
|
+
if (size > MAX_SOURCE_SIZE) { oversizedFiles++; continue; }
|
|
94
|
+
let lines;
|
|
95
|
+
try {
|
|
96
|
+
const buf = fs.readFileSync(full);
|
|
97
|
+
if (buf.includes(0)) { binaryFiles++; continue; }
|
|
98
|
+
lines = buf.toString('utf8').split(/\r?\n/);
|
|
99
|
+
} catch { continue; }
|
|
100
|
+
for (let i=0; i<lines.length; i++) {
|
|
101
|
+
const line=lines[i];
|
|
102
|
+
// Deliberately small heuristic rule set. Not a language parser.
|
|
103
|
+
if (FOCUSED.test(line)) findings.push(finding('FOCUSED_TEST','high','medium','Focused test found','A focused test declaration may silently omit other tests.',{path:rel,line:i+1},'Remove .only / fit / fdescribe, then execute the full suite.'));
|
|
104
|
+
if (SKIPPED.test(line) || SKIPPED_ALT.test(line)) findings.push(finding('SKIPPED_TEST','low','medium','Skipped test found','A skipped test needs review before release.',{path:rel,line:i+1},'Confirm the skip is intended, tracked and does not conceal a required case.'));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (oversizedFiles) limitations.push(`Skipped inspecting ${oversizedFiles} large test file(s) (> ${MAX_SOURCE_SIZE} bytes).`);
|
|
108
|
+
if (binaryFiles) limitations.push(`Skipped inspecting ${binaryFiles} binary test file(s); they contain NUL bytes and were not treated as source.`);
|
|
109
|
+
if (ignoredPaths) limitations.push(`Excluded ${ignoredPaths} path(s) listed in .pramanasutraignore. Excluded content was not inspected.`);
|
|
110
|
+
if (!testFiles.length) findings.push(finding('NO_TESTS','medium','medium','No tests discovered','No test files matched the starter\'s supported path conventions.',{path:'.',line:null},'Confirm test framework location; add and execute relevant tests.'));
|
|
111
|
+
if (!workflows.length) findings.push(finding('NO_CI','medium','medium','No recognized CI workflow discovered','No recognized CI configuration was found in the files scanned.',{path:'.',line:null},'Verify your CI configuration and enforce required test gates.'));
|
|
112
|
+
const license = entries.some(p => /^(?:LICENSE|LICENSE\.md|LICENSE\.txt|COPYING)$/i.test(p));
|
|
113
|
+
if (!license) findings.push(finding('NO_LICENSE','low','high','No license file at root','A recognized open-source license file was not found at the root.',{path:'.',line:null},'Review intended licensing and add the correct LICENSE file before publication.'));
|
|
114
|
+
const output = {
|
|
115
|
+
schemaVersion: '1.0.0', product: 'PramanaSutra AI', toolVersion: toolVersion(), generatedAt: new Date().toISOString(), scannedPath: path.basename(targetPath) || ".",
|
|
116
|
+
capabilities: { staticAudit:'executed', testExecution:'not-run', browser:'not-supported', securityScan:'not-run', performanceTest:'not-run', aiInference:'not-run' },
|
|
117
|
+
inventory: { fileCount:entries.length, testFiles, manifests, ciWorkflows:workflows, skippedSymlinks, oversizedFiles, binaryFiles, ignoredPaths, partial:truncated || oversizedFiles > 0 || binaryFiles > 0 || limitations.some(x=>x.startsWith('Unreadable')) },
|
|
118
|
+
findings, limitations,
|
|
119
|
+
releaseGate: null
|
|
120
|
+
};
|
|
121
|
+
return output;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function evaluateGate(report, evidence = null, policy = DEFAULT_POLICY) {
|
|
125
|
+
const blocking = report.findings.filter(f =>
|
|
126
|
+
['critical', 'high'].includes(f.severity) ? (f.ruleId !== 'FOCUSED_TEST' || policy.blockOnFocusedTests)
|
|
127
|
+
: (f.ruleId === 'SKIPPED_TEST' && policy.blockOnSkippedTests));
|
|
128
|
+
const ev = classifyEvidence(evidence);
|
|
129
|
+
const reasons = [];
|
|
130
|
+
let decision;
|
|
131
|
+
if (blocking.length) {
|
|
132
|
+
decision = 'NO_GO'; reasons.push(`Found ${blocking.length} blocking static finding(s) under policy "${policy.name}".`);
|
|
133
|
+
} else if (ev.state === 'failing') {
|
|
134
|
+
decision = 'NO_GO'; reasons.push(...ev.reasons);
|
|
135
|
+
} else {
|
|
136
|
+
const missing = [];
|
|
137
|
+
if (policy.releaseRequiresExecutedEvidence && ev.state !== 'passing') missing.push(...ev.reasons);
|
|
138
|
+
if (report.inventory.partial) missing.push('Scan is incomplete; treat uninspected content as unknown.');
|
|
139
|
+
if (policy.requireTests && !report.inventory.testFiles.length) missing.push('No test files detected by supported naming conventions.');
|
|
140
|
+
if (policy.requireCi && !report.inventory.ciWorkflows.length) missing.push('No recognized CI workflow detected.');
|
|
141
|
+
if (policy.requireLicense && report.findings.some(f => f.ruleId === 'NO_LICENSE')) missing.push('No license file at root.');
|
|
142
|
+
if (missing.length) { decision = 'REVIEW_REQUIRED'; reasons.push(...missing); }
|
|
143
|
+
else { decision = 'READY_FOR_HUMAN_APPROVAL'; reasons.push('All policy checks satisfied by supplied evidence and static inspection. A human must still approve and deploy.'); }
|
|
144
|
+
}
|
|
145
|
+
return { decision, policy: policy.name, reasons, requiresHumanApproval: true, executedTestEvidence: ev.state === 'passing' || ev.state === 'failing', evidenceState: ev.state, automatedDeploymentAuthorized: false };
|
|
146
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"name": "recommended",
|
|
4
|
+
"releaseRequiresExecutedEvidence": true,
|
|
5
|
+
"blockOnFocusedTests": true,
|
|
6
|
+
"allowAutomatedDeployment": false,
|
|
7
|
+
"blockOnSkippedTests": false,
|
|
8
|
+
"requireCi": true,
|
|
9
|
+
"requireLicense": true,
|
|
10
|
+
"requireTests": true
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"name": "strict",
|
|
4
|
+
"releaseRequiresExecutedEvidence": true,
|
|
5
|
+
"blockOnFocusedTests": true,
|
|
6
|
+
"allowAutomatedDeployment": false,
|
|
7
|
+
"manualApprovalsRequired": true,
|
|
8
|
+
"blockOnSkippedTests": true,
|
|
9
|
+
"requireCi": true,
|
|
10
|
+
"requireLicense": true,
|
|
11
|
+
"requireTests": true
|
|
12
|
+
}
|