@kubbisec/ai-linux-arm64 0.1.14 → 0.1.16
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/bin/kubbisec +0 -0
- package/bundled/config/config.d.ts.map +1 -1
- package/bundled/config/config.js +4 -1
- package/bundled/config/config.js.map +1 -1
- package/bundled/copy/cli-reference-index.d.ts +2 -2
- package/bundled/copy/cli-reference-index.d.ts.map +1 -1
- package/bundled/copy/cli-reference-index.js +26 -6
- package/bundled/copy/cli-reference-index.js.map +1 -1
- package/bundled/extensions/cli-local-shared.d.ts.map +1 -1
- package/bundled/extensions/cli-local-shared.js +2 -1
- package/bundled/extensions/cli-local-shared.js.map +1 -1
- package/bundled/extensions/kubbisec-naus-local.extension.js +6 -6
- package/bundled/extensions/kubbisec-naus-local.extension.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/dto/create-bundle-report.dto.d.ts +8 -5
- package/bundled/node_modules/@aspm/shared/dist/dto/create-bundle-report.dto.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/dto/create-bundle-report.dto.js +35 -1
- package/bundled/node_modules/@aspm/shared/dist/dto/create-bundle-report.dto.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/dto/create-coverage-report.dto.d.ts +15 -1
- package/bundled/node_modules/@aspm/shared/dist/dto/create-coverage-report.dto.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/dto/create-coverage-report.dto.js +88 -3
- package/bundled/node_modules/@aspm/shared/dist/dto/create-coverage-report.dto.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/dto/create-vulnerability.dto.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/dto/create-vulnerability.dto.js +3 -0
- package/bundled/node_modules/@aspm/shared/dist/dto/create-vulnerability.dto.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/dto/index.d.ts +2 -2
- package/bundled/node_modules/@aspm/shared/dist/dto/index.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/dto/index.js +3 -1
- package/bundled/node_modules/@aspm/shared/dist/dto/index.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/index.d.ts +2 -0
- package/bundled/node_modules/@aspm/shared/dist/index.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/index.js +2 -0
- package/bundled/node_modules/@aspm/shared/dist/index.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/project-scanner-summary.d.ts +21 -0
- package/bundled/node_modules/@aspm/shared/dist/project-scanner-summary.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/project-scanner-summary.js +56 -0
- package/bundled/node_modules/@aspm/shared/dist/project-scanner-summary.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/rbac/better-auth-org-roles.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/rbac/better-auth-org-roles.js +0 -1
- package/bundled/node_modules/@aspm/shared/dist/rbac/better-auth-org-roles.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/redaction.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/redaction.js +1 -0
- package/bundled/node_modules/@aspm/shared/dist/redaction.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/security/aspm-gate-rules.d.ts +19 -0
- package/bundled/node_modules/@aspm/shared/dist/security/aspm-gate-rules.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/security/aspm-gate-rules.js +61 -0
- package/bundled/node_modules/@aspm/shared/dist/security/aspm-gate-rules.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/security/build-aspm-security-matrix-pipeline-yaml.d.ts +3 -0
- package/bundled/node_modules/@aspm/shared/dist/security/build-aspm-security-matrix-pipeline-yaml.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/security/build-aspm-security-matrix-pipeline-yaml.js +54 -0
- package/bundled/node_modules/@aspm/shared/dist/security/build-aspm-security-matrix-pipeline-yaml.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/security/build-github-security-workflow-yaml.d.ts +4 -0
- package/bundled/node_modules/@aspm/shared/dist/security/build-github-security-workflow-yaml.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/security/build-github-security-workflow-yaml.js +72 -0
- package/bundled/node_modules/@aspm/shared/dist/security/build-github-security-workflow-yaml.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/security/github-workflow-action-pins.d.ts +27 -0
- package/bundled/node_modules/@aspm/shared/dist/security/github-workflow-action-pins.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/security/github-workflow-action-pins.js +30 -0
- package/bundled/node_modules/@aspm/shared/dist/security/github-workflow-action-pins.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/security/github-workflow-tool-jobs.d.ts +7 -0
- package/bundled/node_modules/@aspm/shared/dist/security/github-workflow-tool-jobs.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/security/github-workflow-tool-jobs.js +184 -0
- package/bundled/node_modules/@aspm/shared/dist/security/github-workflow-tool-jobs.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/security/index.d.ts +7 -0
- package/bundled/node_modules/@aspm/shared/dist/security/index.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/security/index.js +23 -0
- package/bundled/node_modules/@aspm/shared/dist/security/index.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/security/security-tool-catalog.d.ts +5 -0
- package/bundled/node_modules/@aspm/shared/dist/security/security-tool-catalog.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/security/security-tool-catalog.js +74 -0
- package/bundled/node_modules/@aspm/shared/dist/security/security-tool-catalog.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/security/security-tool.types.d.ts +43 -0
- package/bundled/node_modules/@aspm/shared/dist/security/security-tool.types.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/security/security-tool.types.js +22 -0
- package/bundled/node_modules/@aspm/shared/dist/security/security-tool.types.js.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/sonar-safe-string.d.ts +8 -0
- package/bundled/node_modules/@aspm/shared/dist/sonar-safe-string.d.ts.map +1 -1
- package/bundled/node_modules/@aspm/shared/dist/sonar-safe-string.js +65 -0
- package/bundled/node_modules/@aspm/shared/dist/sonar-safe-string.js.map +1 -1
- package/bundled/node_modules/@aspm/shared/package.json +4 -0
- package/bundled/skills/aspm-platform/SKILL.md +9 -4
- package/package.json +1 -1
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KUBBISEC_SCANS_JOB_ID = void 0;
|
|
4
|
+
exports.buildGithubToolJobsSection = buildGithubToolJobsSection;
|
|
5
|
+
const aspm_gate_rules_1 = require("./aspm-gate-rules");
|
|
6
|
+
const github_workflow_action_pins_1 = require("./github-workflow-action-pins");
|
|
7
|
+
exports.KUBBISEC_SCANS_JOB_ID = "kubbisec-scans";
|
|
8
|
+
const ASPM_INSTALL_STEP = ` - name: Install ASPM CLI
|
|
9
|
+
run: npm install -g @kubbisec/aspm`;
|
|
10
|
+
const CHECKOUT_STEP = ` - uses: ${github_workflow_action_pins_1.GITHUB_CHECKOUT_ACTION}`;
|
|
11
|
+
const CHECKOUT_FULL_HISTORY_STEP = ` - uses: ${github_workflow_action_pins_1.GITHUB_CHECKOUT_ACTION}
|
|
12
|
+
with:
|
|
13
|
+
fetch-depth: 0`;
|
|
14
|
+
/**
|
|
15
|
+
* KubbiSec job env — API URL is omitted (ASPM CLI defaults to https://api.kubbisec.com).
|
|
16
|
+
* Only secret key + org/project identifiers are required in CI.
|
|
17
|
+
*/
|
|
18
|
+
function buildKubbisecScansJobEnv(inlineEnv) {
|
|
19
|
+
if (inlineEnv) {
|
|
20
|
+
return ` env:
|
|
21
|
+
KUBBISEC_API_KEY: \${{ secrets.KUBBISEC_API_KEY }}
|
|
22
|
+
KUBBISEC_ORG_ID: ${JSON.stringify(inlineEnv.orgId)}`;
|
|
23
|
+
}
|
|
24
|
+
return ` env:
|
|
25
|
+
KUBBISEC_API_KEY: \${{ secrets.KUBBISEC_API_KEY }}
|
|
26
|
+
KUBBISEC_ORG_ID: \${{ vars.KUBBISEC_ORG_ID }}`;
|
|
27
|
+
}
|
|
28
|
+
const GITHUB_PROJECT_VAR_REF = "${{ vars.KUBBISEC_PROJECT }}";
|
|
29
|
+
function projectRef(inlineEnv) {
|
|
30
|
+
return inlineEnv?.projectId ?? GITHUB_PROJECT_VAR_REF;
|
|
31
|
+
}
|
|
32
|
+
/** Scanner-specific steps (official actions where JSON output is compatible with `aspm upload`). */
|
|
33
|
+
function buildToolScanSteps(tool, inlineEnv) {
|
|
34
|
+
const p = projectRef(inlineEnv);
|
|
35
|
+
switch (tool) {
|
|
36
|
+
case "trivy":
|
|
37
|
+
return ` - name: Trivy filesystem scan
|
|
38
|
+
uses: ${github_workflow_action_pins_1.TRIVY_ACTION}
|
|
39
|
+
with:
|
|
40
|
+
scan-type: fs
|
|
41
|
+
scan-ref: .
|
|
42
|
+
format: json
|
|
43
|
+
output: trivy-report.json
|
|
44
|
+
exit-code: "0"
|
|
45
|
+
|
|
46
|
+
- name: Upload Trivy report
|
|
47
|
+
run: aspm upload trivy-report.json -s trivy -p ${p}`;
|
|
48
|
+
case "gitleaks":
|
|
49
|
+
return ` - name: Gitleaks (GitHub Security)
|
|
50
|
+
uses: ${github_workflow_action_pins_1.GITLEAKS_ACTION}
|
|
51
|
+
continue-on-error: true
|
|
52
|
+
env:
|
|
53
|
+
GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}
|
|
54
|
+
GITLEAKS_ENABLE_UPLOAD_ARTIFACT: "true"
|
|
55
|
+
GITLEAKS_VERSION: "${github_workflow_action_pins_1.GITLEAKS_CLI_VERSION}"
|
|
56
|
+
|
|
57
|
+
- name: Gitleaks scan (JSON para KubbiSec ASPM)
|
|
58
|
+
run: |
|
|
59
|
+
curl -sSL https://github.com/gitleaks/gitleaks/releases/download/v${github_workflow_action_pins_1.GITLEAKS_CLI_VERSION}/gitleaks_${github_workflow_action_pins_1.GITLEAKS_CLI_VERSION}_linux_x64.tar.gz | tar -xz -C /usr/local/bin
|
|
60
|
+
gitleaks detect --source . --report-format json --report-path gitleaks-report.json --exit-code 0 || true
|
|
61
|
+
|
|
62
|
+
- name: Upload Gitleaks report
|
|
63
|
+
run: aspm upload gitleaks-report.json -s gitleaks -p ${p}`;
|
|
64
|
+
case "syft":
|
|
65
|
+
return ` - name: Generate SBOM
|
|
66
|
+
uses: ${github_workflow_action_pins_1.SBOM_ACTION}
|
|
67
|
+
with:
|
|
68
|
+
path: .
|
|
69
|
+
format: cyclonedx-json
|
|
70
|
+
output-file: sbom.cdx.json
|
|
71
|
+
upload-artifact: false
|
|
72
|
+
upload-release-assets: false
|
|
73
|
+
|
|
74
|
+
- name: Upload SBOM
|
|
75
|
+
run: aspm upload sbom.cdx.json -s syft -p ${p}`;
|
|
76
|
+
case "osv":
|
|
77
|
+
return ` - name: OSV scan (JSON para KubbiSec ASPM)
|
|
78
|
+
uses: ${github_workflow_action_pins_1.OSV_SCANNER_ACTION}
|
|
79
|
+
continue-on-error: true
|
|
80
|
+
with:
|
|
81
|
+
scan-args: |-
|
|
82
|
+
--recursive
|
|
83
|
+
--format=json
|
|
84
|
+
--output=osv-report.json
|
|
85
|
+
./
|
|
86
|
+
|
|
87
|
+
- name: OSV SARIF (GitHub Security)
|
|
88
|
+
uses: ${github_workflow_action_pins_1.OSV_REPORTER_ACTION}
|
|
89
|
+
continue-on-error: true
|
|
90
|
+
with:
|
|
91
|
+
scan-args: |-
|
|
92
|
+
--output=osv-results.sarif
|
|
93
|
+
--new=osv-report.json
|
|
94
|
+
--gh-annotations=false
|
|
95
|
+
--fail-on-vuln=false
|
|
96
|
+
|
|
97
|
+
- name: Upload OSV SARIF to GitHub Security
|
|
98
|
+
uses: ${github_workflow_action_pins_1.CODEQL_UPLOAD_SARIF_ACTION}
|
|
99
|
+
if: always()
|
|
100
|
+
continue-on-error: true
|
|
101
|
+
with:
|
|
102
|
+
sarif_file: osv-results.sarif
|
|
103
|
+
category: kubbisec-osv
|
|
104
|
+
|
|
105
|
+
- name: Upload OSV report to KubbiSec
|
|
106
|
+
run: aspm upload osv-report.json -s osv -p ${p}`;
|
|
107
|
+
case "semgrep":
|
|
108
|
+
return ` # semgrep/semgrep-action está deprecated — imagem oficial semgrep/semgrep (Semgrep docs).
|
|
109
|
+
- name: Semgrep scan
|
|
110
|
+
run: |
|
|
111
|
+
docker run --rm -v "$PWD:/src" -w /src ${github_workflow_action_pins_1.SEMGREP_CONTAINER_IMAGE} \\
|
|
112
|
+
semgrep scan --config auto --json -o semgrep-report.json .
|
|
113
|
+
|
|
114
|
+
- name: Upload Semgrep report
|
|
115
|
+
run: aspm upload semgrep-report.json -s semgrep -p ${p}`;
|
|
116
|
+
case "sonar":
|
|
117
|
+
return ` # Configure secrets.SONAR_TOKEN, vars.SONAR_HOST_URL (SonarCloud: https://sonarcloud.io), vars.SONAR_PROJECT_KEY
|
|
118
|
+
- name: SonarQube scan (SonarSource GitHub Action)
|
|
119
|
+
uses: ${github_workflow_action_pins_1.SONAR_SCAN_ACTION}
|
|
120
|
+
env:
|
|
121
|
+
SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }}
|
|
122
|
+
SONAR_HOST_URL: \${{ vars.SONAR_HOST_URL }}
|
|
123
|
+
with:
|
|
124
|
+
args: >
|
|
125
|
+
-Dsonar.projectKey=\${{ vars.SONAR_PROJECT_KEY }}
|
|
126
|
+
|
|
127
|
+
- name: Export Sonar issues (JSON para KubbiSec ASPM)
|
|
128
|
+
run: |
|
|
129
|
+
if [ -n "$SONAR_HOST_URL" ] && [ -n "$SONAR_TOKEN" ]; then
|
|
130
|
+
curl -sS -H "Authorization: Bearer $SONAR_TOKEN" \\
|
|
131
|
+
"$SONAR_HOST_URL/api/issues/search?componentKeys=$SONAR_PROJECT_KEY&ps=500" \\
|
|
132
|
+
-o sonar-report.json || echo '{}' > sonar-report.json
|
|
133
|
+
else
|
|
134
|
+
echo '{}' > sonar-report.json
|
|
135
|
+
fi
|
|
136
|
+
env:
|
|
137
|
+
SONAR_HOST_URL: \${{ vars.SONAR_HOST_URL }}
|
|
138
|
+
SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }}
|
|
139
|
+
SONAR_PROJECT_KEY: \${{ vars.SONAR_PROJECT_KEY }}
|
|
140
|
+
|
|
141
|
+
- name: Upload Sonar report to KubbiSec
|
|
142
|
+
run: aspm upload sonar-report.json -s sonar -p ${p}`;
|
|
143
|
+
case "nmap":
|
|
144
|
+
return ` - name: Install Nmap
|
|
145
|
+
run: sudo apt-get update && sudo apt-get install -y nmap
|
|
146
|
+
|
|
147
|
+
- name: Nmap scan placeholder
|
|
148
|
+
run: |
|
|
149
|
+
echo "Configure NMAP_TARGET (vars) para varredura real; gerando placeholder."
|
|
150
|
+
echo '{}' > nmap-report.json
|
|
151
|
+
|
|
152
|
+
- name: Upload Nmap report
|
|
153
|
+
run: aspm upload nmap-report.json -s nmap -p ${p}`;
|
|
154
|
+
case "skipfish":
|
|
155
|
+
return ` - name: Install Skipfish
|
|
156
|
+
run: sudo apt-get update && sudo apt-get install -y skipfish
|
|
157
|
+
|
|
158
|
+
- name: Skipfish scan placeholder
|
|
159
|
+
run: |
|
|
160
|
+
echo "Configure SKIPFISH_TARGET (vars) para DAST real; gerando placeholder."
|
|
161
|
+
echo '{}' > skipfish-report.json
|
|
162
|
+
|
|
163
|
+
- name: Upload Skipfish report
|
|
164
|
+
run: aspm upload skipfish-report.json -s skipfish -p ${p}`;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
function buildGithubToolJobsSection(tools, inlineEnv) {
|
|
168
|
+
const checkout = tools.includes("gitleaks") ? CHECKOUT_FULL_HISTORY_STEP : CHECKOUT_STEP;
|
|
169
|
+
const kubbisecScansJobEnv = buildKubbisecScansJobEnv(inlineEnv);
|
|
170
|
+
const toolSteps = tools.map((tool) => buildToolScanSteps(tool, inlineEnv)).join("\n\n");
|
|
171
|
+
const jobsYaml = ` ${exports.KUBBISEC_SCANS_JOB_ID}:
|
|
172
|
+
runs-on: ubuntu-latest
|
|
173
|
+
${kubbisecScansJobEnv}
|
|
174
|
+
steps:
|
|
175
|
+
${checkout}
|
|
176
|
+
|
|
177
|
+
${ASPM_INSTALL_STEP}
|
|
178
|
+
|
|
179
|
+
${toolSteps}
|
|
180
|
+
|
|
181
|
+
${(0, aspm_gate_rules_1.buildAspmGateGithubWorkflowStep)(undefined, inlineEnv?.projectId)}`;
|
|
182
|
+
return { jobIds: [exports.KUBBISEC_SCANS_JOB_ID], jobsYaml };
|
|
183
|
+
}
|
|
184
|
+
//# sourceMappingURL=github-workflow-tool-jobs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-workflow-tool-jobs.js","sourceRoot":"","sources":["../../src/security/github-workflow-tool-jobs.ts"],"names":[],"mappings":";;;AAwLA,gEAwBC;AAhND,uDAAoE;AACpE,+EAWuC;AAG1B,QAAA,qBAAqB,GAAG,gBAAgB,CAAC;AAEtD,MAAM,iBAAiB,GAAG;2CACiB,CAAC;AAE5C,MAAM,aAAa,GAAG,iBAAiB,oDAAsB,EAAE,CAAC;AAEhE,MAAM,0BAA0B,GAAG,iBAAiB,oDAAsB;;yBAEjD,CAAC;AAE1B;;;GAGG;AACH,SAAS,wBAAwB,CAAC,SAAmC;IACnE,IAAI,SAAS,EAAE,CAAC;QACd,OAAO;;yBAEc,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;IACzD,CAAC;IACD,OAAO;;oDAE2C,CAAC;AACrD,CAAC;AAED,MAAM,sBAAsB,GAAG,8BAA8B,CAAC;AAE9D,SAAS,UAAU,CAAC,SAAmC;IACrD,OAAO,SAAS,EAAE,SAAS,IAAI,sBAAsB,CAAC;AACxD,CAAC;AAED,oGAAoG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AC,IAAI,CAAC,MAAM,CAAC,CAAC;IAExF,MAAM,QAAQ,GAAG,KAAK,6BAAqB;;EAE3C,mBAAmB;;EAEnB,QAAQ;;EAER,iBAAiB;;EAEjB,SAAS;;EAET,IAAA,iDAA+B,EAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,CAAC;IAEnE,OAAO,EAAE,MAAM,EAAE,CAAC,6BAAqB,CAAC,EAAE,QAAQ,EAAE,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./security-tool.types";
|
|
2
|
+
export * from "./security-tool-catalog";
|
|
3
|
+
export * from "./aspm-gate-rules";
|
|
4
|
+
export * from "./build-aspm-security-matrix-pipeline-yaml";
|
|
5
|
+
export * from "./build-github-security-workflow-yaml";
|
|
6
|
+
export * from "./github-workflow-action-pins";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/security/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,4CAA4C,CAAC;AAC3D,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./security-tool.types"), exports);
|
|
18
|
+
__exportStar(require("./security-tool-catalog"), exports);
|
|
19
|
+
__exportStar(require("./aspm-gate-rules"), exports);
|
|
20
|
+
__exportStar(require("./build-aspm-security-matrix-pipeline-yaml"), exports);
|
|
21
|
+
__exportStar(require("./build-github-security-workflow-yaml"), exports);
|
|
22
|
+
__exportStar(require("./github-workflow-action-pins"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/security/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,0DAAwC;AACxC,oDAAkC;AAClC,6EAA2D;AAC3D,wEAAsD;AACtD,gEAA8C"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SecurityToolCatalogEntry } from "./security-tool.types";
|
|
2
|
+
export declare const SECURITY_TOOL_CATALOG: readonly SecurityToolCatalogEntry[];
|
|
3
|
+
export declare function isSecurityToolId(value: string): value is SecurityToolCatalogEntry["id"];
|
|
4
|
+
export declare function normalizeSecurityTools(tools: readonly string[] | undefined | null): SecurityToolCatalogEntry["id"][];
|
|
5
|
+
//# sourceMappingURL=security-tool-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"security-tool-catalog.d.ts","sourceRoot":"","sources":["../../src/security/security-tool-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEtE,eAAO,MAAM,qBAAqB,EAAE,SAAS,wBAAwB,EAiD3D,CAAC;AAEX,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,wBAAwB,CAAC,IAAI,CAAC,CAEvF;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GAAG,IAAI,GAC1C,wBAAwB,CAAC,IAAI,CAAC,EAAE,CAalC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SECURITY_TOOL_CATALOG = void 0;
|
|
4
|
+
exports.isSecurityToolId = isSecurityToolId;
|
|
5
|
+
exports.normalizeSecurityTools = normalizeSecurityTools;
|
|
6
|
+
exports.SECURITY_TOOL_CATALOG = [
|
|
7
|
+
{
|
|
8
|
+
id: "osv",
|
|
9
|
+
label: "OSV Scanner",
|
|
10
|
+
category: "sca",
|
|
11
|
+
description: "Open Source Vulnerabilities em lockfiles e dependências.",
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
id: "gitleaks",
|
|
15
|
+
label: "Gitleaks",
|
|
16
|
+
category: "secrets",
|
|
17
|
+
description: "Detecção de segredos no histórico Git.",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: "syft",
|
|
21
|
+
label: "Syft",
|
|
22
|
+
category: "sbom",
|
|
23
|
+
description: "Geração de SBOM CycloneDX.",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: "trivy",
|
|
27
|
+
label: "Trivy",
|
|
28
|
+
category: "sca",
|
|
29
|
+
description: "CVEs em filesystem, containers e IaC.",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: "semgrep",
|
|
33
|
+
label: "Semgrep",
|
|
34
|
+
category: "sast",
|
|
35
|
+
description: "Análise estática com regras auto.",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "sonar",
|
|
39
|
+
label: "SonarQube",
|
|
40
|
+
category: "quality",
|
|
41
|
+
description: "Qualidade e issues via Sonar (requer SONAR_*).",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: "nmap",
|
|
45
|
+
label: "Nmap",
|
|
46
|
+
category: "network",
|
|
47
|
+
description: "Varredura de rede (upload manual do relatório).",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: "skipfish",
|
|
51
|
+
label: "Skipfish",
|
|
52
|
+
category: "dast",
|
|
53
|
+
description: "DAST web (upload manual do relatório).",
|
|
54
|
+
},
|
|
55
|
+
];
|
|
56
|
+
function isSecurityToolId(value) {
|
|
57
|
+
return exports.SECURITY_TOOL_CATALOG.some((entry) => entry.id === value);
|
|
58
|
+
}
|
|
59
|
+
function normalizeSecurityTools(tools) {
|
|
60
|
+
if (!tools?.length) {
|
|
61
|
+
return ["osv", "gitleaks", "syft", "trivy", "semgrep"];
|
|
62
|
+
}
|
|
63
|
+
const seen = new Set();
|
|
64
|
+
const normalized = [];
|
|
65
|
+
for (const raw of tools) {
|
|
66
|
+
const id = raw.trim().toLowerCase();
|
|
67
|
+
if (!isSecurityToolId(id) || seen.has(id))
|
|
68
|
+
continue;
|
|
69
|
+
seen.add(id);
|
|
70
|
+
normalized.push(id);
|
|
71
|
+
}
|
|
72
|
+
return normalized.length > 0 ? normalized : ["osv", "gitleaks", "syft", "trivy", "semgrep"];
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=security-tool-catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"security-tool-catalog.js","sourceRoot":"","sources":["../../src/security/security-tool-catalog.ts"],"names":[],"mappings":";;;AAqDA,4CAEC;AAED,wDAeC;AAtEY,QAAA,qBAAqB,GAAwC;IACxE;QACE,EAAE,EAAE,KAAK;QACT,KAAK,EAAE,aAAa;QACpB,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,0DAA0D;KACxE;IACD;QACE,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,U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I,EAAE,CAAC,WAAW,EAAE,CAAC;QACpC,IAAI,CAAC,gBAAgB,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YAAE,SAAS;QACpD,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACb,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACtB,CAAC;IACD,OAAO,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;AAC9F,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Naus `aspm_matrix` tool ids — must match @naus/validation `aspmToolIdSchema`. */
|
|
2
|
+
export declare const SECURITY_TOOL_IDS: readonly ["osv", "gitleaks", "syft", "trivy", "semgrep", "sonar", "nmap", "skipfish"];
|
|
3
|
+
export type SecurityToolId = (typeof SECURITY_TOOL_IDS)[number];
|
|
4
|
+
export declare const DEFAULT_SECURITY_TOOLS: SecurityToolId[];
|
|
5
|
+
export type SecurityToolCategory = "sca" | "sast" | "secrets" | "sbom" | "network" | "dast" | "quality";
|
|
6
|
+
export type SecurityToolCatalogEntry = {
|
|
7
|
+
id: SecurityToolId;
|
|
8
|
+
label: string;
|
|
9
|
+
category: SecurityToolCategory;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
export type GithubWorkflowTriggerEvents = {
|
|
13
|
+
push: boolean;
|
|
14
|
+
pushBranches: string[];
|
|
15
|
+
pullRequest: boolean;
|
|
16
|
+
workflowDispatch: boolean;
|
|
17
|
+
schedule: boolean;
|
|
18
|
+
scheduleCron: string;
|
|
19
|
+
};
|
|
20
|
+
/** KubbiSec vars inlined in generated workflows (API URL omitted — ASPM CLI uses cloud default). */
|
|
21
|
+
export type GithubWorkflowInlineEnv = {
|
|
22
|
+
orgId: string;
|
|
23
|
+
projectId: string;
|
|
24
|
+
};
|
|
25
|
+
export type BuildGithubSecurityWorkflowOptions = {
|
|
26
|
+
workflowName: string;
|
|
27
|
+
tools: SecurityToolId[];
|
|
28
|
+
events: GithubWorkflowTriggerEvents;
|
|
29
|
+
inlineEnv?: GithubWorkflowInlineEnv;
|
|
30
|
+
};
|
|
31
|
+
export type BuildAspmSecurityMatrixPipelineOptions = {
|
|
32
|
+
pipelineName?: string;
|
|
33
|
+
matrixStrategy?: "chain" | "fanout";
|
|
34
|
+
gateRules?: {
|
|
35
|
+
vulnerabilities?: {
|
|
36
|
+
max_by_severity: Record<string, number>;
|
|
37
|
+
};
|
|
38
|
+
coverage?: {
|
|
39
|
+
min_line_pct: number;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=security-tool.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"security-tool.types.d.ts","sourceRoot":"","sources":["../../src/security/security-tool.types.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,eAAO,MAAM,iBAAiB,uFASpB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,eAAO,MAAM,sBAAsB,EAAE,cAAc,EAMlD,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAC5B,KAAK,GACL,MAAM,GACN,SAAS,GACT,MAAM,GACN,SAAS,GACT,MAAM,GACN,SAAS,CAAC;AAEd,MAAM,MAAM,wBAAwB,GAAG;IACrC,EAAE,EAAE,cAAc,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,oGAAoG;AACpG,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG;IAC/C,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,MAAM,EAAE,2BAA2B,CAAC;IACpC,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,sCAAsC,GAAG;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IACpC,SAAS,CAAC,EAAE;QACV,eAAe,CAAC,EAAE;YAAE,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;SAAE,CAAC;QAC9D,QAAQ,CAAC,EAAE;YAAE,YAAY,EAAE,MAAM,CAAA;SAAE,CAAC;KACrC,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_SECURITY_TOOLS = exports.SECURITY_TOOL_IDS = void 0;
|
|
4
|
+
/** Naus `aspm_matrix` tool ids — must match @naus/validation `aspmToolIdSchema`. */
|
|
5
|
+
exports.SECURITY_TOOL_IDS = [
|
|
6
|
+
"osv",
|
|
7
|
+
"gitleaks",
|
|
8
|
+
"syft",
|
|
9
|
+
"trivy",
|
|
10
|
+
"semgrep",
|
|
11
|
+
"sonar",
|
|
12
|
+
"nmap",
|
|
13
|
+
"skipfish",
|
|
14
|
+
];
|
|
15
|
+
exports.DEFAULT_SECURITY_TOOLS = [
|
|
16
|
+
"osv",
|
|
17
|
+
"gitleaks",
|
|
18
|
+
"syft",
|
|
19
|
+
"trivy",
|
|
20
|
+
"semgrep",
|
|
21
|
+
];
|
|
22
|
+
//# sourceMappingURL=security-tool.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"security-tool.types.js","sourceRoot":"","sources":["../../src/security/security-tool.types.ts"],"names":[],"mappings":";;;AAAA,oFAAoF;AACvE,QAAA,iBAAiB,GAAG;IAC/B,KAAK;IACL,UAAU;IACV,MAAM;IACN,OAAO;IACP,SAAS;IACT,OAAO;IACP,MAAM;IACN,UAAU;CACF,CAAC;AAIE,QAAA,sBAAsB,GAAqB;IACtD,KAAK;IACL,UAAU;IACV,MAAM;IACN,OAAO;IACP,SAAS;CACV,CAAC"}
|
|
@@ -13,6 +13,14 @@ export declare function parseBracketPrefixedMessage(message: string): {
|
|
|
13
13
|
} | null;
|
|
14
14
|
/** Extract file/path hints from free-form location text (CI / AI outputs). */
|
|
15
15
|
export declare function extractPathHints(location: string): string[];
|
|
16
|
+
/** Remove a leading `api/` segment without regex (Sonar S5852). */
|
|
17
|
+
export declare function stripApiPathPrefix(value: string): string;
|
|
18
|
+
/** Remove leading `/` runs without regex. */
|
|
19
|
+
export declare function stripLeadingSlashes(value: string): string;
|
|
20
|
+
/** Strip optional surrounding ASCII quotes without regex. */
|
|
21
|
+
export declare function trimSurroundingQuotes(value: string): string;
|
|
22
|
+
/** Drop `:line` / `:line:col` suffixes from path-like tokens (CI / scanner locations). */
|
|
23
|
+
export declare function stripLineNumberSuffixes(location: string): string;
|
|
16
24
|
/** Sanitize a string into a Kubernetes resource name (RFC 1123 subset). */
|
|
17
25
|
export declare function sanitizeKubernetesName(value: string, fallback?: string): string;
|
|
18
26
|
//# sourceMappingURL=sonar-safe-string.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sonar-safe-string.d.ts","sourceRoot":"","sources":["../src/sonar-safe-string.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,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A0E;AAC1E,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,MAAM,GACd;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAOzC;AAsBD,8EAA8E;AAC9E,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAsB3D;AAED,mEAAmE;AACnE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKxD;AAED,6CAA6C;AAC7C,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIzD;AAED,6DAA6D;AAC7D,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAM3D;AAED,0FAA0F;AAC1F,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAsChE;AAED,2EAA2E;AAC3E,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,SAAa,GAAG,MAAM,CAInF"}
|
|
@@ -6,6 +6,10 @@ exports.slugify = slugify;
|
|
|
6
6
|
exports.extractFencedBlock = extractFencedBlock;
|
|
7
7
|
exports.parseBracketPrefixedMessage = parseBracketPrefixedMessage;
|
|
8
8
|
exports.extractPathHints = extractPathHints;
|
|
9
|
+
exports.stripApiPathPrefix = stripApiPathPrefix;
|
|
10
|
+
exports.stripLeadingSlashes = stripLeadingSlashes;
|
|
11
|
+
exports.trimSurroundingQuotes = trimSurroundingQuotes;
|
|
12
|
+
exports.stripLineNumberSuffixes = stripLineNumberSuffixes;
|
|
9
13
|
exports.sanitizeKubernetesName = sanitizeKubernetesName;
|
|
10
14
|
/** Remove trailing `/` without regex (avoids Sonar S5852 ReDoS on `/\/+$/`). */
|
|
11
15
|
function trimTrailingSlashes(value) {
|
|
@@ -128,6 +132,67 @@ function extractPathHints(location) {
|
|
|
128
132
|
}
|
|
129
133
|
return hints;
|
|
130
134
|
}
|
|
135
|
+
/** Remove a leading `api/` segment without regex (Sonar S5852). */
|
|
136
|
+
function stripApiPathPrefix(value) {
|
|
137
|
+
if (!value.startsWith("api"))
|
|
138
|
+
return value;
|
|
139
|
+
let index = 3;
|
|
140
|
+
while (index < value.length && value.charCodeAt(index) === 47)
|
|
141
|
+
index += 1;
|
|
142
|
+
return value.slice(index);
|
|
143
|
+
}
|
|
144
|
+
/** Remove leading `/` runs without regex. */
|
|
145
|
+
function stripLeadingSlashes(value) {
|
|
146
|
+
let start = 0;
|
|
147
|
+
while (start < value.length && value.charCodeAt(start) === 47)
|
|
148
|
+
start += 1;
|
|
149
|
+
return value.slice(start);
|
|
150
|
+
}
|
|
151
|
+
/** Strip optional surrounding ASCII quotes without regex. */
|
|
152
|
+
function trimSurroundingQuotes(value) {
|
|
153
|
+
let start = 0;
|
|
154
|
+
let end = value.length;
|
|
155
|
+
while (start < end && (value[start] === '"' || value[start] === "'"))
|
|
156
|
+
start += 1;
|
|
157
|
+
while (end > start && (value[end - 1] === '"' || value[end - 1] === "'"))
|
|
158
|
+
end -= 1;
|
|
159
|
+
return value.slice(start, end);
|
|
160
|
+
}
|
|
161
|
+
/** Drop `:line` / `:line:col` suffixes from path-like tokens (CI / scanner locations). */
|
|
162
|
+
function stripLineNumberSuffixes(location) {
|
|
163
|
+
const tokens = location.split(/\s+/);
|
|
164
|
+
const cleaned = [];
|
|
165
|
+
for (const token of tokens) {
|
|
166
|
+
const colon = token.lastIndexOf(":");
|
|
167
|
+
if (colon <= 0) {
|
|
168
|
+
cleaned.push(token);
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
const dot = token.lastIndexOf(".");
|
|
172
|
+
if (dot === -1 || dot >= colon) {
|
|
173
|
+
cleaned.push(token);
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
let index = colon + 1;
|
|
177
|
+
let hasDigits = false;
|
|
178
|
+
while (index < token.length) {
|
|
179
|
+
const code = token.charCodeAt(index);
|
|
180
|
+
if (code >= 48 && code <= 57) {
|
|
181
|
+
hasDigits = true;
|
|
182
|
+
index += 1;
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
if (code === 58 && hasDigits) {
|
|
186
|
+
index += 1;
|
|
187
|
+
hasDigits = false;
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
192
|
+
cleaned.push(index === token.length && hasDigits ? token.slice(0, colon) : token);
|
|
193
|
+
}
|
|
194
|
+
return cleaned.join(" ");
|
|
195
|
+
}
|
|
131
196
|
/** Sanitize a string into a Kubernetes resource name (RFC 1123 subset). */
|
|
132
197
|
function sanitizeKubernetesName(value, fallback = "naus-job") {
|
|
133
198
|
const slug = slugify(value, fallback);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sonar-safe-string.js","sourceRoot":"","sources":["../src/sonar-safe-string.ts"],"names":[],"mappings":";;AACA,kDAKC;AAGD,sCAOC;AAGD,0BAkBC;AAGD,gDAmBC;AAGD,kEASC;AAuBD,4CAsBC;AAGD,wDAIC;
|
|
1
|
+
{"version":3,"file":"sonar-safe-string.js","sourceRoot":"","sources":["../src/sonar-safe-string.ts"],"names":[],"mappings":";;AACA,kDAKC;AAGD,sCAOC;AAGD,0BAkBC;AAGD,gDAmBC;AAGD,kEASC;AAuBD,4CAsBC;AAGD,gDAKC;AAGD,kDAIC;AAGD,sDAMC;AAGD,0DAsCC;AAGD,wDAIC;AA5LD,gFAAgF;AAChF,SAAgB,mBAAmB,CAAC,KAAa;IAC/C,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,IAAI,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC;IACvB,OAAO,GAAG,GAAG,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,CAAC,KAAK,EAAE;QAAE,GAAG,IAAI,CAAC,CAAC;IAC7D,OAAO,GAAG,KAAK,KAAK,CAAC,MAAM,CAAC,CAAC,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,QAAQ,GAAG,UAAU;IACzE,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACzC,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,QAAQ,CAAC;AAC1C,CAAC"}
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
10
10
|
"default": "./dist/index.js"
|
|
11
11
|
},
|
|
12
|
+
"./security": {
|
|
13
|
+
"types": "./dist/security/index.d.ts",
|
|
14
|
+
"default": "./dist/security/index.js"
|
|
15
|
+
},
|
|
12
16
|
"./github/kubbisec-github-label": {
|
|
13
17
|
"types": "./dist/github/kubbisec-github-label.d.ts",
|
|
14
18
|
"default": "./dist/github/kubbisec-github-label.js"
|
|
@@ -7,7 +7,7 @@ description: KubbiSec ASPM — uploads, gates, projetos e integração com NAUS/
|
|
|
7
7
|
|
|
8
8
|
`npm install -g @kubbisec/aspm` → binário `aspm`.
|
|
9
9
|
|
|
10
|
-
**Docs:** `aspm_docs` (secção `aspm-commands` + guias por scanner). **HARD-GATE:** chamar `aspm_docs` ou `security_scanner_playbook` antes de citar flags completas — não inventar sintaxe.
|
|
10
|
+
**Docs:** `aspm_docs` (secção `aspm-commands` + guias por scanner com install Linux/macOS/Windows). Recursos: `kubbisec://aspm/aspm-scanner-{trivy|gitleaks|osv|syft|semgrep|sonar|nmap|skipfish}`, `kubbisec://aspm/aspm-coverage` (Jest, Vitest, pytest, JaCoCo, Go). **HARD-GATE:** chamar `aspm_docs` ou `security_scanner_playbook` antes de citar flags completas — não inventar sintaxe.
|
|
11
11
|
|
|
12
12
|
## Comandos CLI
|
|
13
13
|
|
|
@@ -23,11 +23,16 @@ description: KubbiSec ASPM — uploads, gates, projetos e integração com NAUS/
|
|
|
23
23
|
| `aspm coverage <file>` | Upload de coverage (lcov) |
|
|
24
24
|
| `aspm parse-coverage <file>` | Parse coverage local |
|
|
25
25
|
| `aspm projects` | Listar projetos da organização |
|
|
26
|
-
| `aspm
|
|
26
|
+
| `aspm gate` | Avaliar relatórios locais contra regras inline |
|
|
27
|
+
| `aspm dashboard` | Resumo de postura no terminal |
|
|
28
|
+
|
|
29
|
+
### Credenciais
|
|
30
|
+
|
|
31
|
+
API key: **Perfil → API Keys** (`/profile/api-keys`). `-o/--org` = **slug** da organização (ex.: `minha-empresa`).
|
|
27
32
|
|
|
28
33
|
### Flags globais
|
|
29
34
|
|
|
30
|
-
`-k/--api-key`, `-o/--org
|
|
35
|
+
`-k/--api-key`, `-o/--org` (slug), `-p/--project`, `-v/--version`, `-h/--help`
|
|
31
36
|
|
|
32
37
|
### Variáveis de ambiente (precedência: flags CLI > env > `~/.kubbisec/config.json`)
|
|
33
38
|
|
|
@@ -35,7 +40,7 @@ description: KubbiSec ASPM — uploads, gates, projetos e integração com NAUS/
|
|
|
35
40
|
|----------|-----------|
|
|
36
41
|
| `KUBBISEC_API_URL` / `ASPM_API_URL` | URL da API |
|
|
37
42
|
| `KUBBISEC_API_KEY` / `ASPM_API_KEY` | API key |
|
|
38
|
-
| `KUBBISEC_ORG_ID` / `ASPM_ORG_ID` |
|
|
43
|
+
| `KUBBISEC_ORG_ID` / `ASPM_ORG_ID` | Slug da organização |
|
|
39
44
|
| `KUBBISEC_PROJECT` / `KUBBISEC_PROJECT_ID` / `ASPM_PROJECT_ID` | Project ID |
|
|
40
45
|
|
|
41
46
|
## Scanners ↔ `-s` ↔ ficheiro de relatório
|