@kubbisec/ai-linux-arm64 0.1.24 → 0.1.25

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.
Files changed (70) hide show
  1. package/bin/kubbisec +0 -0
  2. package/bundled/node_modules/@kubbisec/shared/dist/ai/product-knowledge/build-chat-system-prompt.js +1 -1
  3. package/bundled/node_modules/@kubbisec/shared/dist/ai/product-knowledge/cli-reference-index.d.ts +1 -1
  4. package/bundled/node_modules/@kubbisec/shared/dist/ai/product-knowledge/cli-reference-index.d.ts.map +1 -1
  5. package/bundled/node_modules/@kubbisec/shared/dist/ai/product-knowledge/cli-reference-index.js +4 -4
  6. package/bundled/node_modules/@kubbisec/shared/dist/ai/product-knowledge/format-mcp-knowledge.d.ts +1 -1
  7. package/bundled/node_modules/@kubbisec/shared/dist/ai/product-knowledge/format-mcp-knowledge.d.ts.map +1 -1
  8. package/bundled/node_modules/@kubbisec/shared/dist/ai/product-knowledge/format-mcp-knowledge.js +4 -4
  9. package/bundled/node_modules/@kubbisec/shared/dist/ai/product-knowledge/format-mcp-knowledge.js.map +1 -1
  10. package/bundled/node_modules/@kubbisec/shared/dist/ai/product-knowledge/mcp-instructions.d.ts +1 -1
  11. package/bundled/node_modules/@kubbisec/shared/dist/ai/product-knowledge/mcp-instructions.d.ts.map +1 -1
  12. package/bundled/node_modules/@kubbisec/shared/dist/ai/product-knowledge/mcp-instructions.js +8 -9
  13. package/bundled/node_modules/@kubbisec/shared/dist/ai/product-knowledge/mcp-instructions.js.map +1 -1
  14. package/bundled/node_modules/@kubbisec/shared/dist/ai/product-knowledge/mental-map.d.ts +2 -2
  15. package/bundled/node_modules/@kubbisec/shared/dist/ai/product-knowledge/mental-map.d.ts.map +1 -1
  16. package/bundled/node_modules/@kubbisec/shared/dist/ai/product-knowledge/mental-map.js +4 -4
  17. package/bundled/node_modules/@kubbisec/shared/dist/dto/bulk-import-bitbucket-projects.dto.d.ts +15 -0
  18. package/bundled/node_modules/@kubbisec/shared/dist/dto/bulk-import-bitbucket-projects.dto.d.ts.map +1 -0
  19. package/bundled/node_modules/@kubbisec/shared/dist/dto/bulk-import-bitbucket-projects.dto.js +75 -0
  20. package/bundled/node_modules/@kubbisec/shared/dist/dto/bulk-import-bitbucket-projects.dto.js.map +1 -0
  21. package/bundled/node_modules/@kubbisec/shared/dist/dto/index.d.ts +1 -0
  22. package/bundled/node_modules/@kubbisec/shared/dist/dto/index.d.ts.map +1 -1
  23. package/bundled/node_modules/@kubbisec/shared/dist/dto/index.js +5 -1
  24. package/bundled/node_modules/@kubbisec/shared/dist/dto/index.js.map +1 -1
  25. package/bundled/node_modules/@kubbisec/shared/dist/index.d.ts +1 -0
  26. package/bundled/node_modules/@kubbisec/shared/dist/index.d.ts.map +1 -1
  27. package/bundled/node_modules/@kubbisec/shared/dist/index.js +1 -0
  28. package/bundled/node_modules/@kubbisec/shared/dist/index.js.map +1 -1
  29. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/ai-docs-bundle.loader.d.ts +6 -0
  30. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/ai-docs-bundle.loader.d.ts.map +1 -0
  31. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/ai-docs-bundle.loader.js +68 -0
  32. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/ai-docs-bundle.loader.js.map +1 -0
  33. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/aspm-docs-bundle.loader.d.ts +8 -0
  34. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/aspm-docs-bundle.loader.d.ts.map +1 -0
  35. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/aspm-docs-bundle.loader.js +115 -0
  36. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/aspm-docs-bundle.loader.js.map +1 -0
  37. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/doc-bundle-utils.d.ts +12 -0
  38. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/doc-bundle-utils.d.ts.map +1 -0
  39. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/doc-bundle-utils.js +86 -0
  40. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/doc-bundle-utils.js.map +1 -0
  41. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/index.d.ts +8 -0
  42. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/index.d.ts.map +1 -0
  43. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/index.js +33 -0
  44. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/index.js.map +1 -0
  45. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/mcp-tools-catalog.d.ts +4 -0
  46. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/mcp-tools-catalog.d.ts.map +1 -0
  47. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/mcp-tools-catalog.js +23 -0
  48. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/mcp-tools-catalog.js.map +1 -0
  49. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/monorepo-root.d.ts +4 -0
  50. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/monorepo-root.d.ts.map +1 -0
  51. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/monorepo-root.js +19 -0
  52. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/monorepo-root.js.map +1 -0
  53. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/naus-pipeline-docs-bundle.loader.d.ts +11 -0
  54. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/naus-pipeline-docs-bundle.loader.d.ts.map +1 -0
  55. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/naus-pipeline-docs-bundle.loader.js +148 -0
  56. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/naus-pipeline-docs-bundle.loader.js.map +1 -0
  57. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/naus-schema-overview.d.ts +2 -0
  58. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/naus-schema-overview.d.ts.map +1 -0
  59. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/naus-schema-overview.js +36 -0
  60. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/naus-schema-overview.js.map +1 -0
  61. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/security-scanner-playbooks.d.ts +49 -0
  62. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/security-scanner-playbooks.d.ts.map +1 -0
  63. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/security-scanner-playbooks.js +600 -0
  64. package/bundled/node_modules/@kubbisec/shared/dist/product-docs/security-scanner-playbooks.js.map +1 -0
  65. package/bundled/node_modules/@kubbisec/shared/dist/rbac/platform-staff.d.ts +2 -0
  66. package/bundled/node_modules/@kubbisec/shared/dist/rbac/platform-staff.d.ts.map +1 -1
  67. package/bundled/node_modules/@kubbisec/shared/dist/rbac/platform-staff.js +5 -0
  68. package/bundled/node_modules/@kubbisec/shared/dist/rbac/platform-staff.js.map +1 -1
  69. package/bundled/node_modules/@kubbisec/shared/package.json +4 -0
  70. package/package.json +1 -1
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Operational playbooks for ASPM scanners (CLI + NAUS).
3
+ * Duplicated from web guides — API must not import apps/web.
4
+ */
5
+ export declare const SECURITY_SCANNER_IDS: readonly ["trivy", "gitleaks", "syft", "osv", "semgrep", "sonar", "nmap", "skipfish"];
6
+ export type SecurityScannerId = (typeof SECURITY_SCANNER_IDS)[number];
7
+ export type ScannerPlatform = "linux" | "macos" | "windows";
8
+ export type PlaybookTopic = "install" | "scan" | "upload" | "naus" | "formats" | "all";
9
+ export type ScannerPlaybookEntry = {
10
+ id: SecurityScannerId;
11
+ label: string;
12
+ category: "sca" | "sast" | "secrets" | "sbom" | "network" | "dast";
13
+ capabilities: string[];
14
+ defaultReportFile: string;
15
+ reportFormats: string[];
16
+ uploadSource: SecurityScannerId;
17
+ platforms: ScannerPlatform[];
18
+ };
19
+ export declare const SCANNER_META: Record<SecurityScannerId, Omit<ScannerPlaybookEntry, "id" | "platforms">>;
20
+ /** NAUS matrix job example shared across scanner playbooks (for docs + contract tests). */
21
+ export declare const PLAYBOOK_ASPM_MATRIX_EXAMPLE: "kind: aspm_matrix\nmatrix_strategy: fanout\nparallel:\n - tool: trivy\n - tool: gitleaks\n - tool: osv";
22
+ export declare function listPlaybookNausKindAspmSnippets(): Array<{
23
+ scanner: SecurityScannerId;
24
+ snippet: string;
25
+ }>;
26
+ export declare function wrapPlaybookSnippetAsPipelineYaml(snippet: string, name?: string): string;
27
+ export declare function isSecurityScannerId(value: string): value is SecurityScannerId;
28
+ export declare function parseSecurityScannerPlaybookArgs(argsRaw: string): {
29
+ ok: true;
30
+ scanner: SecurityScannerId;
31
+ platform: ScannerPlatform;
32
+ topic: PlaybookTopic;
33
+ } | {
34
+ ok: false;
35
+ error: string;
36
+ hint?: string;
37
+ };
38
+ export declare function buildSecurityScannersCatalogPayload(): {
39
+ scanners: ScannerPlaybookEntry[];
40
+ aspmCliInstall: string;
41
+ uploadFlag: string;
42
+ nausTools: SecurityScannerId[];
43
+ assistantTools: {
44
+ catalog: string;
45
+ playbook: string;
46
+ };
47
+ };
48
+ export declare function buildSecurityScannerPlaybookPayload(scanner: SecurityScannerId, platform: ScannerPlatform, topic: PlaybookTopic): Record<string, unknown>;
49
+ //# sourceMappingURL=security-scanner-playbooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security-scanner-playbooks.d.ts","sourceRoot":"","sources":["../../src/product-docs/security-scanner-playbooks.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,oBAAoB,uFASvB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AACtE,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;AAC5D,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,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AAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,cAAc,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;CACvD,CAiBA;AAYD,wBAAgB,mCAAmC,CACjD,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE,aAAa,GACnB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA8CzB"}
@@ -0,0 +1,600 @@
1
+ "use strict";
2
+ /**
3
+ * Operational playbooks for ASPM scanners (CLI + NAUS).
4
+ * Duplicated from web guides — API must not import apps/web.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.PLAYBOOK_ASPM_MATRIX_EXAMPLE = exports.SCANNER_META = exports.SECURITY_SCANNER_IDS = void 0;
8
+ exports.listPlaybookNausKindAspmSnippets = listPlaybookNausKindAspmSnippets;
9
+ exports.wrapPlaybookSnippetAsPipelineYaml = wrapPlaybookSnippetAsPipelineYaml;
10
+ exports.isSecurityScannerId = isSecurityScannerId;
11
+ exports.parseSecurityScannerPlaybookArgs = parseSecurityScannerPlaybookArgs;
12
+ exports.buildSecurityScannersCatalogPayload = buildSecurityScannersCatalogPayload;
13
+ exports.buildSecurityScannerPlaybookPayload = buildSecurityScannerPlaybookPayload;
14
+ exports.SECURITY_SCANNER_IDS = [
15
+ "trivy",
16
+ "gitleaks",
17
+ "syft",
18
+ "osv",
19
+ "semgrep",
20
+ "sonar",
21
+ "nmap",
22
+ "skipfish",
23
+ ];
24
+ const ASPM_CLI_INSTALL = "npm install -g @kubbisec/aspm";
25
+ const NAUS_CLI_INSTALL = "npm install -g @kubbisec/naus";
26
+ const NAUS_CLOUD_DEFAULTS = {
27
+ enrollUrl: "https://enroll.kubbisec.com",
28
+ apiUrl: "https://api.kubbisec.com",
29
+ };
30
+ const NAUS_CLI_OPS = {
31
+ install: NAUS_CLI_INSTALL,
32
+ validate: "naus validate <pipeline.yml>",
33
+ check: "naus check <pipeline.yml> (alias of validate)",
34
+ plan: "naus plan <pipeline.yml> [--format mermaid] [--env-file .env]... [--secret-file .secrets]...",
35
+ run: "naus run <pipeline.yml> [--env-file .env]... [--secret-file .secrets]... (defaults: .env / .secrets in cwd when present)",
36
+ register: "naus register [bootstrap-token] [--renew]",
37
+ start: "naus start",
38
+ migrate: "naus migrate (legacy token → mTLS certificate)",
39
+ daemon: "naus daemon list | naus daemon stop",
40
+ docs: "naus_pipeline_docs (20 web sections + runner-management)",
41
+ kbsLocalTools: ["naus_local_validate", "naus_local_plan", "naus_local_run"],
42
+ kbsCloudTools: ["naus_validate_yaml", "trigger_run", "set_pipeline_yaml"],
43
+ };
44
+ exports.SCANNER_META = {
45
+ trivy: {
46
+ label: "Trivy",
47
+ category: "sca",
48
+ capabilities: ["filesystem CVEs", "container images", "IaC misconfig", "licenses"],
49
+ defaultReportFile: "trivy-report.json",
50
+ reportFormats: ["json"],
51
+ uploadSource: "trivy",
52
+ },
53
+ gitleaks: {
54
+ label: "Gitleaks",
55
+ category: "secrets",
56
+ capabilities: ["secrets in git history", "pre-commit hooks"],
57
+ defaultReportFile: "gitleaks-report.json",
58
+ reportFormats: ["json", "sarif"],
59
+ uploadSource: "gitleaks",
60
+ },
61
+ syft: {
62
+ label: "Syft",
63
+ category: "sbom",
64
+ capabilities: ["SBOM generation", "CycloneDX", "SPDX"],
65
+ defaultReportFile: "sbom.json",
66
+ reportFormats: ["cyclonedx-json", "spdx-json"],
67
+ uploadSource: "syft",
68
+ },
69
+ osv: {
70
+ label: "OSV-Scanner",
71
+ category: "sca",
72
+ capabilities: ["dependency advisories", "lockfiles", "monorepos"],
73
+ defaultReportFile: "osv-report.json",
74
+ reportFormats: ["json"],
75
+ uploadSource: "osv",
76
+ },
77
+ semgrep: {
78
+ label: "Semgrep",
79
+ category: "sast",
80
+ capabilities: ["SAST rules", "custom policies", "CI gates"],
81
+ defaultReportFile: "semgrep-report.json",
82
+ reportFormats: ["json", "sarif"],
83
+ uploadSource: "semgrep",
84
+ },
85
+ sonar: {
86
+ label: "SonarQube",
87
+ category: "sast",
88
+ capabilities: ["SAST", "code smells", "quality gates via Sonar server"],
89
+ defaultReportFile: "sonar-report.json",
90
+ reportFormats: ["json"],
91
+ uploadSource: "sonar",
92
+ },
93
+ nmap: {
94
+ label: "Nmap",
95
+ category: "network",
96
+ capabilities: ["port scan", "service detection", "XML export"],
97
+ defaultReportFile: "nmap-report.xml",
98
+ reportFormats: ["xml"],
99
+ uploadSource: "nmap",
100
+ },
101
+ skipfish: {
102
+ label: "Skipfish",
103
+ category: "dast",
104
+ capabilities: ["web crawling", "fuzzing", "DAST-style findings"],
105
+ defaultReportFile: "skipfish-report.json",
106
+ reportFormats: ["json"],
107
+ uploadSource: "skipfish",
108
+ },
109
+ };
110
+ const PLAYBOOKS = {
111
+ trivy: {
112
+ install: {
113
+ linux: {
114
+ install: "curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin",
115
+ extras: [
116
+ {
117
+ label: "Docker (latest)",
118
+ code: 'docker run --rm -v "$(pwd):/work" -w /work aquasec/trivy:latest fs --format json -o trivy-report.json .',
119
+ },
120
+ ],
121
+ },
122
+ macos: {
123
+ install: "brew install trivy",
124
+ extras: [
125
+ {
126
+ label: "Gerar relatório (CLI)",
127
+ code: "trivy fs --format json --output trivy-report.json .",
128
+ },
129
+ ],
130
+ },
131
+ windows: {
132
+ install: "winget install --id AquaSecurity.Trivy -e",
133
+ extras: [
134
+ { label: "Chocolatey", code: "choco install trivy -y" },
135
+ {
136
+ label: "Docker",
137
+ code: 'docker run --rm -v "${PWD}:/work" -w /work aquasec/trivy:latest fs --format json -o trivy-report.json .',
138
+ },
139
+ ],
140
+ },
141
+ },
142
+ body: {
143
+ scan: {
144
+ linux: "trivy fs --format json --output trivy-report.json .",
145
+ macos: "trivy fs --format json --output trivy-report.json .",
146
+ windows: "trivy fs --format json --output trivy-report.json .",
147
+ },
148
+ upload: 'aspm upload "trivy-report.json" -s trivy -p <project-id> -k <api-key> -o <org-id>',
149
+ formats: "JSON (default). Image scan: trivy image --format json -o trivy-report.json <image>",
150
+ naus: {
151
+ kindAspm: `run:
152
+ - trivy-scan:
153
+ kind: aspm
154
+ tool: trivy
155
+ mode: scan-and-upload
156
+ display_name: "Trivy Security Scan"`,
157
+ kindAspmMatrix: `parallel:
158
+ - tool: trivy
159
+ format: json`,
160
+ kindDockerAspmTrivy: `kind: docker
161
+ registry:
162
+ server: <registry>
163
+ auth: { username: "<user>", password: "$REGISTRY_TOKEN" }
164
+ tags: ["<registry>/app:tag"]
165
+ aspm:
166
+ tool: trivy
167
+ report_path: trivy-image-report.json
168
+ scan: { severity: "HIGH,CRITICAL", exit_code: 0 }
169
+ gate:
170
+ rules:
171
+ vulnerabilities:
172
+ max_by_severity: { CRITICAL: 0 }`,
173
+ },
174
+ },
175
+ },
176
+ gitleaks: {
177
+ install: {
178
+ linux: {
179
+ install: "curl -sSL https://github.com/gitleaks/gitleaks/releases/download/v8.21.2/gitleaks_8.21.2_linux_x64.tar.gz | tar -xz -C /usr/local/bin",
180
+ extras: [
181
+ {
182
+ label: "Docker",
183
+ code: 'docker run --rm -v "$(pwd):/work" -w /work zricethezav/gitleaks detect --source . --report-format json --report-path gitleaks-report.json --exit-code 0',
184
+ },
185
+ ],
186
+ },
187
+ macos: {
188
+ install: "brew install gitleaks",
189
+ extras: [
190
+ {
191
+ label: "Docker",
192
+ code: 'docker run --rm -v "$(pwd):/work" -w /work zricethezav/gitleaks detect --source . --report-format json --report-path gitleaks-report.json --exit-code 0',
193
+ },
194
+ ],
195
+ },
196
+ windows: {
197
+ install: "choco install gitleaks -y",
198
+ extras: [{ label: "winget", code: "winget install --id Gitleaks.Gitleaks -e" }],
199
+ },
200
+ },
201
+ body: {
202
+ scan: {
203
+ linux: "gitleaks detect --source . --report-format json --report-path gitleaks-report.json --exit-code 0",
204
+ macos: "gitleaks detect --source . --report-format json --report-path gitleaks-report.json --exit-code 0",
205
+ windows: "gitleaks detect --source . --report-format json --report-path gitleaks-report.json --exit-code 0",
206
+ },
207
+ upload: 'aspm upload "gitleaks-report.json" -s gitleaks -p <project-id> -k <api-key> -o <org-id>',
208
+ formats: "JSON or SARIF via --report-format",
209
+ naus: {
210
+ kindAspm: `run:
211
+ - secrets:
212
+ kind: aspm
213
+ tool: gitleaks
214
+ mode: scan-and-upload`,
215
+ kindAspmMatrix: `parallel:
216
+ - tool: gitleaks`,
217
+ },
218
+ },
219
+ },
220
+ syft: {
221
+ install: {
222
+ linux: {
223
+ install: "curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin",
224
+ extras: [
225
+ {
226
+ label: "Docker",
227
+ code: 'docker run --rm -v "$(pwd):/work" -w /work anchore/syft dir:/work -o cyclonedx-json=sbom.json',
228
+ },
229
+ ],
230
+ },
231
+ macos: { install: "brew install syft" },
232
+ windows: { install: "winget install --id Anchore.Syft -e" },
233
+ },
234
+ body: {
235
+ scan: {
236
+ linux: "syft dir:. -o cyclonedx-json=sbom.json",
237
+ macos: "syft dir:. -o cyclonedx-json=sbom.json",
238
+ windows: "syft dir:. -o cyclonedx-json=sbom.json",
239
+ },
240
+ upload: 'aspm upload "sbom.json" -s syft -p <project-id> -k <api-key> -o <org-id>',
241
+ formats: "cyclonedx-json (default sbom.json), spdx-json",
242
+ naus: {
243
+ kindAspm: `run:
244
+ - sbom:
245
+ kind: aspm
246
+ tool: syft
247
+ mode: scan-and-upload`,
248
+ kindAspmMatrix: `parallel:
249
+ - tool: syft
250
+ format: cyclonedx-json`,
251
+ },
252
+ },
253
+ },
254
+ osv: {
255
+ install: {
256
+ linux: {
257
+ install: "go install github.com/google/osv-scanner/cmd/osv-scanner@latest",
258
+ extras: [
259
+ {
260
+ label: "Binary download",
261
+ code: "curl -sSL https://github.com/google/osv-scanner/releases/latest/download/osv-scanner_linux_amd64 -o osv-scanner && chmod +x osv-scanner",
262
+ },
263
+ ],
264
+ },
265
+ macos: { install: "brew install osv-scanner" },
266
+ windows: {
267
+ install: "winget install --id Google.OSVScanner -e",
268
+ extras: [{ label: "Chocolatey", code: "choco install osv-scanner -y" }],
269
+ },
270
+ },
271
+ body: {
272
+ scan: {
273
+ linux: "osv-scanner scan --recursive --format json --output osv-report.json .",
274
+ macos: "osv-scanner scan --recursive --format json --output osv-report.json .",
275
+ windows: "osv-scanner scan --recursive --format json --output osv-report.json .",
276
+ },
277
+ upload: 'aspm upload "osv-report.json" -s osv -p <project-id> -k <api-key> -o <org-id>',
278
+ formats: "JSON",
279
+ naus: {
280
+ kindAspm: `run:
281
+ - deps:
282
+ kind: aspm
283
+ tool: osv
284
+ mode: scan-and-upload`,
285
+ kindAspmMatrix: `parallel:
286
+ - tool: osv`,
287
+ },
288
+ },
289
+ },
290
+ semgrep: {
291
+ install: {
292
+ linux: {
293
+ install: "pip install semgrep",
294
+ extras: [
295
+ {
296
+ label: "Docker",
297
+ code: 'docker run --rm -v "$(pwd):/work" -w /work semgrep/semgrep semgrep scan --config auto --json -o semgrep-report.json /work',
298
+ },
299
+ ],
300
+ },
301
+ macos: {
302
+ install: "brew install semgrep",
303
+ extras: [
304
+ {
305
+ label: "Docker",
306
+ code: 'docker run --rm -v "$(pwd):/work" -w /work semgrep/semgrep semgrep scan --config auto --json -o semgrep-report.json /work',
307
+ },
308
+ ],
309
+ },
310
+ windows: {
311
+ install: "pip install semgrep",
312
+ extras: [
313
+ {
314
+ label: "Docker",
315
+ code: 'docker run --rm -v "%cd%:/work" -w /work semgrep/semgrep semgrep scan --config auto --json -o semgrep-report.json /work',
316
+ },
317
+ ],
318
+ },
319
+ },
320
+ body: {
321
+ scan: {
322
+ linux: "semgrep scan --config auto --json -o semgrep-report.json",
323
+ macos: "semgrep scan --config auto --json -o semgrep-report.json",
324
+ windows: "semgrep scan --config auto --json -o semgrep-report.json",
325
+ },
326
+ upload: 'aspm upload "semgrep-report.json" -s semgrep -p <project-id> -k <api-key> -o <org-id>',
327
+ formats: "JSON, SARIF",
328
+ naus: {
329
+ kindAspm: `run:
330
+ - sast:
331
+ kind: aspm
332
+ tool: semgrep
333
+ mode: scan-and-upload
334
+ display_name: "Semgrep SAST"`,
335
+ kindAspmMatrix: `parallel:
336
+ - tool: semgrep`,
337
+ },
338
+ },
339
+ },
340
+ sonar: {
341
+ install: {
342
+ linux: {
343
+ install: "mkdir -p /tmp/sonar-local # copie docker-compose.yml e setup-and-scan.sh das tabs Sonar",
344
+ extras: [
345
+ {
346
+ label: "Subir Sonar local + scan rápido",
347
+ code: "docker compose -f /tmp/sonar-local/docker-compose.yml up -d && /tmp/sonar-local/setup-and-scan.sh",
348
+ },
349
+ {
350
+ label: "Export issues (SonarCloud ou server existente)",
351
+ code: 'curl -fsSL -H "Authorization: Bearer $SONAR_TOKEN" "$SONAR_HOST_URL/api/issues/search?componentKeys=$SONAR_PROJECT_KEY&ps=500" -o sonar-report.json',
352
+ },
353
+ ],
354
+ },
355
+ macos: {
356
+ install: "mkdir -p /tmp/sonar-local # copie docker-compose.yml e setup-and-scan.sh das tabs Sonar",
357
+ extras: [
358
+ {
359
+ label: "Subir Sonar local + scan rápido",
360
+ code: "docker compose -f /tmp/sonar-local/docker-compose.yml up -d && /tmp/sonar-local/setup-and-scan.sh",
361
+ },
362
+ {
363
+ label: "Export issues (SonarCloud ou server existente)",
364
+ code: 'curl -fsSL -H "Authorization: Bearer $SONAR_TOKEN" "$SONAR_HOST_URL/api/issues/search?componentKeys=$SONAR_PROJECT_KEY&ps=500" -o sonar-report.json',
365
+ },
366
+ ],
367
+ },
368
+ windows: {
369
+ install: "mkdir -p /tmp/sonar-local # copie docker-compose.yml e setup-and-scan.sh das tabs Sonar",
370
+ extras: [
371
+ {
372
+ label: "Subir Sonar local + scan rápido",
373
+ code: "docker compose -f /tmp/sonar-local/docker-compose.yml up -d && /tmp/sonar-local/setup-and-scan.sh",
374
+ },
375
+ {
376
+ label: "Export issues (SonarCloud ou server existente)",
377
+ code: 'curl -fsSL -H "Authorization: Bearer $SONAR_TOKEN" "$SONAR_HOST_URL/api/issues/search?componentKeys=$SONAR_PROJECT_KEY&ps=500" -o sonar-report.json',
378
+ },
379
+ ],
380
+ },
381
+ },
382
+ body: {
383
+ scan: {
384
+ linux: "docker compose -f /tmp/sonar-local/docker-compose.yml up -d && /tmp/sonar-local/setup-and-scan.sh",
385
+ macos: "docker compose -f /tmp/sonar-local/docker-compose.yml up -d && /tmp/sonar-local/setup-and-scan.sh",
386
+ windows: "docker compose -f /tmp/sonar-local/docker-compose.yml up -d && /tmp/sonar-local/setup-and-scan.sh",
387
+ },
388
+ upload: 'aspm upload "sonar-report.json" -s sonar -p <project-id> -k <api-key> -o <org-id>',
389
+ formats: "JSON export from SonarQube API (issues search)",
390
+ naus: {
391
+ kindAspm: `run:
392
+ - sonar:
393
+ kind: aspm
394
+ tool: sonar
395
+ mode: upload
396
+ report_path: sonar-report.json`,
397
+ kindAspmMatrix: `parallel:
398
+ - tool: sonar`,
399
+ },
400
+ },
401
+ },
402
+ nmap: {
403
+ install: {
404
+ linux: {
405
+ install: "sudo apt-get update && sudo apt-get install -y nmap",
406
+ extras: [{ label: "Fedora/RHEL", code: "sudo dnf install -y nmap" }],
407
+ },
408
+ macos: { install: "brew install nmap" },
409
+ windows: {
410
+ install: "winget install --id Insecure.Nmap -e",
411
+ extras: [{ label: "Chocolatey", code: "choco install nmap -y" }],
412
+ },
413
+ },
414
+ body: {
415
+ scan: {
416
+ linux: "nmap -sV -oX nmap-report.xml 192.168.1.1",
417
+ macos: "nmap -sV -oX nmap-report.xml 192.168.1.1",
418
+ windows: "nmap -sV -oX nmap-report.xml 192.168.1.1",
419
+ },
420
+ upload: 'aspm upload "nmap-report.xml" -s nmap -p <project-id> -k <api-key> -o <org-id>',
421
+ formats: "XML (-oX)",
422
+ naus: {
423
+ kindAspm: `run:
424
+ - network:
425
+ kind: aspm
426
+ tool: nmap
427
+ mode: scan-and-upload
428
+ target: "192.168.1.0/24"`,
429
+ kindAspmMatrix: `parallel:
430
+ - tool: nmap`,
431
+ },
432
+ },
433
+ },
434
+ skipfish: {
435
+ install: {
436
+ linux: { install: "sudo apt-get update && sudo apt-get install -y skipfish" },
437
+ macos: { install: "brew install skipfish" },
438
+ windows: {
439
+ install: "choco install skipfish -y",
440
+ extras: [
441
+ {
442
+ label: "WSL",
443
+ code: "wsl sudo apt-get update && wsl sudo apt-get install -y skipfish",
444
+ },
445
+ ],
446
+ },
447
+ },
448
+ body: {
449
+ scan: {
450
+ linux: "skipfish -o skipfish-out https://app.example.com",
451
+ macos: "skipfish -o skipfish-out https://app.example.com",
452
+ windows: "skipfish -o skipfish-out https://app.example.com",
453
+ },
454
+ upload: 'aspm upload "skipfish-report.json" -s skipfish -p <project-id> -k <api-key> -o <org-id>',
455
+ formats: "JSON report path (convert/export per skipfish output dir)",
456
+ naus: {
457
+ kindAspm: `run:
458
+ - dast:
459
+ kind: aspm
460
+ tool: skipfish
461
+ mode: scan-and-upload
462
+ target: "https://app.example.com"`,
463
+ kindAspmMatrix: `parallel:
464
+ - tool: skipfish`,
465
+ },
466
+ },
467
+ },
468
+ };
469
+ /** NAUS matrix job example shared across scanner playbooks (for docs + contract tests). */
470
+ exports.PLAYBOOK_ASPM_MATRIX_EXAMPLE = `kind: aspm_matrix
471
+ matrix_strategy: fanout
472
+ parallel:
473
+ - tool: trivy
474
+ - tool: gitleaks
475
+ - tool: osv`;
476
+ function listPlaybookNausKindAspmSnippets() {
477
+ return exports.SECURITY_SCANNER_IDS.map((scanner) => ({
478
+ scanner,
479
+ snippet: PLAYBOOKS[scanner].body.naus.kindAspm,
480
+ }));
481
+ }
482
+ function wrapPlaybookSnippetAsPipelineYaml(snippet, name = "playbook-test") {
483
+ const trimmed = snippet.trim();
484
+ if (trimmed.startsWith("run:")) {
485
+ return `name: ${name}\n${trimmed}`;
486
+ }
487
+ return `name: ${name}\nrun:\n - job:\n${trimmed
488
+ .split("\n")
489
+ .map((line) => ` ${line}`)
490
+ .join("\n")}`;
491
+ }
492
+ function isSecurityScannerId(value) {
493
+ return exports.SECURITY_SCANNER_IDS.includes(value);
494
+ }
495
+ function parseSecurityScannerPlaybookArgs(argsRaw) {
496
+ let parsed;
497
+ try {
498
+ parsed = argsRaw.trim() ? JSON.parse(argsRaw) : {};
499
+ }
500
+ catch {
501
+ return { ok: false, error: "invalid_json", hint: "args must be JSON" };
502
+ }
503
+ const scannerValue = parsed.scanner ?? parsed.tool;
504
+ const scannerRaw = (scannerValue == null ? "" : String(scannerValue)).trim().toLowerCase();
505
+ if (!scannerRaw || !isSecurityScannerId(scannerRaw)) {
506
+ return {
507
+ ok: false,
508
+ error: "invalid_scanner",
509
+ hint: `scanner must be one of: ${exports.SECURITY_SCANNER_IDS.join(", ")}`,
510
+ };
511
+ }
512
+ const platformValue = parsed.platform ?? "linux";
513
+ const platformRaw = (platformValue == null ? "linux" : String(platformValue))
514
+ .trim()
515
+ .toLowerCase();
516
+ const platform = (() => {
517
+ if (platformRaw === "macos" || platformRaw === "darwin")
518
+ return "macos";
519
+ if (platformRaw === "windows" || platformRaw === "win32")
520
+ return "windows";
521
+ return "linux";
522
+ })();
523
+ const topicValue = parsed.topic ?? "all";
524
+ const topicRaw = (topicValue == null ? "all" : String(topicValue)).trim().toLowerCase();
525
+ const topic = ["install", "scan", "upload", "naus", "formats", "all"].includes(topicRaw)
526
+ ? topicRaw
527
+ : "all";
528
+ return { ok: true, scanner: scannerRaw, platform, topic };
529
+ }
530
+ function buildSecurityScannersCatalogPayload() {
531
+ const scanners = exports.SECURITY_SCANNER_IDS.map((id) => ({
532
+ id,
533
+ platforms: ["linux", "macos", "windows"],
534
+ ...exports.SCANNER_META[id],
535
+ }));
536
+ return {
537
+ scanners,
538
+ aspmCliInstall: ASPM_CLI_INSTALL,
539
+ uploadFlag: "aspm upload <file> -s <scanner> -p <project-id> -k <api-key> -o <org-id>",
540
+ nausTools: [...exports.SECURITY_SCANNER_IDS],
541
+ assistantTools: {
542
+ catalog: "security_scanners_catalog",
543
+ playbook: "security_scanner_playbook(scanner, platform?, topic?)",
544
+ },
545
+ };
546
+ }
547
+ function pickTopicSections(topic, sections) {
548
+ if (topic === "all")
549
+ return sections;
550
+ const key = topic;
551
+ if (key in sections)
552
+ return { [key]: sections[key] };
553
+ return { error: "topic_empty", requested: topic };
554
+ }
555
+ function buildSecurityScannerPlaybookPayload(scanner, platform, topic) {
556
+ const meta = exports.SCANNER_META[scanner];
557
+ const playbook = PLAYBOOKS[scanner];
558
+ const installBlock = playbook.install[platform];
559
+ const sections = {
560
+ scanner: scanner,
561
+ label: meta.label,
562
+ category: meta.category,
563
+ capabilities: meta.capabilities,
564
+ platform,
565
+ installAspm: ASPM_CLI_INSTALL,
566
+ install: {
567
+ command: installBlock.install,
568
+ extras: installBlock.extras ?? [],
569
+ },
570
+ scan: { command: playbook.body.scan[platform] },
571
+ upload: {
572
+ command: playbook.body.upload,
573
+ defaultReportFile: meta.defaultReportFile,
574
+ source: meta.uploadSource,
575
+ },
576
+ formats: {
577
+ summary: playbook.body.formats,
578
+ defaultReportFile: meta.defaultReportFile,
579
+ accepted: meta.reportFormats,
580
+ },
581
+ naus: {
582
+ kind_aspm: playbook.body.naus.kindAspm,
583
+ ...(playbook.body.naus.kindAspmMatrix
584
+ ? { kind_aspm_matrix_snippet: playbook.body.naus.kindAspmMatrix }
585
+ : {}),
586
+ ...(playbook.body.naus.kindDockerAspmTrivy
587
+ ? { kind_docker_aspm_trivy: playbook.body.naus.kindDockerAspmTrivy }
588
+ : {}),
589
+ cli: NAUS_CLI_OPS,
590
+ cloudDefaults: NAUS_CLOUD_DEFAULTS,
591
+ envForUpload: ["ASPM_API_URL", "ASPM_API_KEY", "ASPM_PROJECT_ID", "ASPM_ORG_ID"],
592
+ matrixExample: exports.PLAYBOOK_ASPM_MATRIX_EXAMPLE,
593
+ },
594
+ };
595
+ return {
596
+ source: "security-scanner-playbooks",
597
+ ...pickTopicSections(topic, sections),
598
+ };
599
+ }
600
+ //# sourceMappingURL=security-scanner-playbooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security-scanner-playbooks.js","sourceRoot":"","sources":["../../src/product-docs/security-scanner-playbooks.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA0gBH,4EAQC;AAED,8EASC;AAED,kDAEC;AAED,4EA4CC;AAED,kFAuBC;AAYD,kFAkDC;AApqBY,QAAA,oBAAoB,GAAG;IAClC,OAAO;IACP,UAAU;IACV,MAAM;IACN,KAAK;IACL,SAAS;IACT,OAAO;IACP,MAAM;IACN,UAAU;CACF,CAAC;AAMX,MAAM,gBAAgB,GAAG,+BAA+B,CAAC;AACzD,MAAM,gBAAgB,GAAG,+BAA+B,CAAC;AACzD,MAAM,mBAAmB,GAAG;IAC1B,SAAS,EAAE,6BAA6B;IACxC,MAAM,EAAE,0BAA0B;CAC1B,CAAC;AAEX,MAAM,YAAY,GAAG;IACnB,OAAO,EAAE,gBAAgB;IACzB,QAAQ,EAAE,8BAA8B;IACxC,KAAK,EAAE,+CAA+C;IACtD,IAAI,EAAE,8FAA8F;IACpG,GAAG,EAAE,0HAA0H;IAC/H,QAAQ,EAAE,2CAA2C;IACrD,KAAK,EAAE,YAAY;IACnB,OAAO,EAAE,gDAAgD;IACzD,MAAM,EAAE,qCAAqC;IAC7C,IAAI,EAAE,0DAA0D;IAChE,aAAa,EAAE,CAAC,qBAAqB,EAAE,iBAAiB,EAAE,gBAAgB,CAAC;IAC3E,aAAa,EAAE,CAAC,oBAAoB,EAAE,aAAa,EAAE,mBAAmB,CAAC;CACjE,CAAC;AAaE,QAAA,YAAY,GAGrB;IACF,KAAK,EAAE;QACL,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,KAAK;QACf,YAAY,EAAE,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,eAAe,EAAE,UAAU,CAAC;QAClF,iBAAiB,EAAE,mBAAmB;QACtC,aAAa,EAAE,CAAC,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