@kubbisec/aspm 1.0.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/LICENSE +21 -0
- package/README.md +101 -0
- package/bin/aspm.js +82 -0
- package/package.json +33 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 KubbiSec
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# @kubbisec/aspm
|
|
2
|
+
|
|
3
|
+
Official **KubbiSec ASPM** CLI — upload security findings, coverage, and SBOM data, and manage projects from the terminal.
|
|
4
|
+
|
|
5
|
+
**ASPM** (Application Security Posture Management) centralizes scans, coverage gates, and reporting so teams can track risk in one place.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Authentication** — session-based login aligned with the KubbiSec web app.
|
|
10
|
+
- **Scan ingestion** — push reports from common scanners into a project.
|
|
11
|
+
- **Coverage** — upload LCOV or Clover for test coverage tracking and gates.
|
|
12
|
+
- **Local tooling** — parse and validate reports without sending data (dry run).
|
|
13
|
+
- **Native binaries** — per-platform executables via `optionalDependencies` (no `postinstall` scripts; works with `npm install --ignore-scripts`).
|
|
14
|
+
|
|
15
|
+
## Requirements
|
|
16
|
+
|
|
17
|
+
- **Node.js** 18 or newer.
|
|
18
|
+
- A **KubbiSec** account and API access (URL, API key, organization/project identifiers as required by your tenant).
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install -g @kubbisec/aspm
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Quick start
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Authenticate (follow the prompts or use your org’s SSO flow if configured)
|
|
30
|
+
aspm login
|
|
31
|
+
|
|
32
|
+
# Upload a vulnerability / scan report
|
|
33
|
+
aspm scan report.json -s trivy -p <project-id>
|
|
34
|
+
|
|
35
|
+
# Upload coverage
|
|
36
|
+
aspm coverage lcov.info -p <project-id>
|
|
37
|
+
|
|
38
|
+
# Parse locally without uploading
|
|
39
|
+
aspm parse report.json -s trivy
|
|
40
|
+
|
|
41
|
+
# Open the dashboard (browser)
|
|
42
|
+
aspm dashboard
|
|
43
|
+
|
|
44
|
+
# List projects
|
|
45
|
+
aspm projects
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Run `aspm --help` for subcommands and global options.
|
|
49
|
+
|
|
50
|
+
## Supported scanners
|
|
51
|
+
|
|
52
|
+
| Scanner | Use case | Typical format |
|
|
53
|
+
|----------|-----------------------|----------------|
|
|
54
|
+
| Trivy | Container / deps | JSON |
|
|
55
|
+
| Sonar | SAST | JSON |
|
|
56
|
+
| Nmap | Network | XML |
|
|
57
|
+
| Skipfish | Web | JSON |
|
|
58
|
+
| OSV | Dependency advisories | JSON |
|
|
59
|
+
| Gitleaks | Secrets | JSON |
|
|
60
|
+
| Syft | SBOM | JSON |
|
|
61
|
+
|
|
62
|
+
Exact flags and file expectations may vary by version; use `aspm scan --help` and your KubbiSec project settings.
|
|
63
|
+
|
|
64
|
+
## Coverage formats
|
|
65
|
+
|
|
66
|
+
- **LCOV** — e.g. `lcov.info` (Jest, Vitest, Istanbul, and similar).
|
|
67
|
+
- **Clover** — e.g. `clover.xml` (Vitest, PHPUnit, OpenClover, and similar).
|
|
68
|
+
|
|
69
|
+
## Configuration
|
|
70
|
+
|
|
71
|
+
CLI configuration is stored at:
|
|
72
|
+
|
|
73
|
+
`~/.kubbisec/config.json`
|
|
74
|
+
|
|
75
|
+
You can override defaults with environment variables (typical):
|
|
76
|
+
|
|
77
|
+
| Variable | Purpose |
|
|
78
|
+
|---------------------|----------------------|
|
|
79
|
+
| `KUBBISEC_API_URL` | API base URL |
|
|
80
|
+
| `KUBBISEC_API_KEY` | API key / token |
|
|
81
|
+
| `KUBBISEC_ORG_ID` | Organization ID |
|
|
82
|
+
| `KUBBISEC_PROJECT` | Default project ID |
|
|
83
|
+
|
|
84
|
+
## Supported platforms
|
|
85
|
+
|
|
86
|
+
Installing `@kubbisec/aspm` selects the matching binary:
|
|
87
|
+
|
|
88
|
+
| OS | Architecture | npm package |
|
|
89
|
+
|---------|--------------|---------------------------------|
|
|
90
|
+
| Linux | x64 | `@kubbisec/aspm-linux-x64` |
|
|
91
|
+
| Linux | arm64 | `@kubbisec/aspm-linux-arm64` |
|
|
92
|
+
| macOS | arm64 | `@kubbisec/aspm-darwin-arm64` |
|
|
93
|
+
| Windows | x64 | `@kubbisec/aspm-win32-x64` |
|
|
94
|
+
|
|
95
|
+
## License
|
|
96
|
+
|
|
97
|
+
MIT — see `LICENSE` in this package.
|
|
98
|
+
|
|
99
|
+
## Trademarks
|
|
100
|
+
|
|
101
|
+
**KubbiSec** and related marks are property of their respective owners. This package is distributed for use with the KubbiSec ASPM platform.
|
package/bin/aspm.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @kubbisec/aspm — Launcher
|
|
5
|
+
*
|
|
6
|
+
* Detects platform, resolves native binary from optionalDependencies, executes.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
"use strict";
|
|
10
|
+
|
|
11
|
+
const { spawn } = require("child_process");
|
|
12
|
+
const path = require("path");
|
|
13
|
+
const fs = require("fs");
|
|
14
|
+
|
|
15
|
+
const PLATFORM_MAP = {
|
|
16
|
+
"linux-x64": "@kubbisec/aspm-linux-x64",
|
|
17
|
+
"linux-arm64": "@kubbisec/aspm-linux-arm64",
|
|
18
|
+
"darwin-arm64": "@kubbisec/aspm-darwin-arm64",
|
|
19
|
+
"win32-x64": "@kubbisec/aspm-win32-x64",
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const platformKey = `${process.platform}-${process.arch}`;
|
|
23
|
+
const packageName = PLATFORM_MAP[platformKey];
|
|
24
|
+
|
|
25
|
+
if (!packageName) {
|
|
26
|
+
console.error(
|
|
27
|
+
`[aspm] Unsupported platform: ${process.platform}/${process.arch}\n` +
|
|
28
|
+
`Supported: ${Object.keys(PLATFORM_MAP).map((k) => k.replace("-", "/")).join(", ")}`,
|
|
29
|
+
);
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const binaryName = process.platform === "win32" ? "aspm.exe" : "aspm";
|
|
34
|
+
let binaryPath = null;
|
|
35
|
+
|
|
36
|
+
try {
|
|
37
|
+
const pkgDir = path.dirname(require.resolve(`${packageName}/package.json`));
|
|
38
|
+
const candidate = path.join(pkgDir, "bin", binaryName);
|
|
39
|
+
if (fs.existsSync(candidate)) binaryPath = candidate;
|
|
40
|
+
} catch {}
|
|
41
|
+
|
|
42
|
+
if (!binaryPath) {
|
|
43
|
+
const search = [
|
|
44
|
+
path.resolve(__dirname, "..", "..", packageName, "bin", binaryName),
|
|
45
|
+
path.resolve(__dirname, "..", "node_modules", packageName, "bin", binaryName),
|
|
46
|
+
];
|
|
47
|
+
for (const c of search) {
|
|
48
|
+
if (fs.existsSync(c)) { binaryPath = c; break; }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (!binaryPath) {
|
|
53
|
+
console.error(
|
|
54
|
+
`[aspm] Native binary not found for ${process.platform}/${process.arch}.\n` +
|
|
55
|
+
`Expected package: ${packageName}\n` +
|
|
56
|
+
`Try reinstalling: npm install -g @kubbisec/aspm`,
|
|
57
|
+
);
|
|
58
|
+
process.exit(1);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (process.platform !== "win32") {
|
|
62
|
+
try { fs.chmodSync(binaryPath, 0o755); } catch {}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
66
|
+
stdio: "inherit",
|
|
67
|
+
env: process.env,
|
|
68
|
+
windowsHide: true,
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
process.on("SIGINT", () => { try { child.kill("SIGINT"); } catch {} });
|
|
72
|
+
process.on("SIGTERM", () => { try { child.kill("SIGTERM"); } catch {} });
|
|
73
|
+
|
|
74
|
+
child.on("error", (err) => {
|
|
75
|
+
console.error(`[aspm] Failed to execute binary: ${err.message}`);
|
|
76
|
+
process.exit(1);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
child.on("exit", (code, signal) => {
|
|
80
|
+
if (signal) process.kill(process.pid, signal);
|
|
81
|
+
else process.exit(code ?? 1);
|
|
82
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kubbisec/aspm",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "KubbiSec ASPM — Application Security Posture Management CLI",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"bin": {
|
|
7
|
+
"aspm": "bin/aspm.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin",
|
|
11
|
+
"README.md",
|
|
12
|
+
"LICENSE"
|
|
13
|
+
],
|
|
14
|
+
"optionalDependencies": {
|
|
15
|
+
"@kubbisec/aspm-linux-x64": "1.0.2",
|
|
16
|
+
"@kubbisec/aspm-linux-arm64": "1.0.2",
|
|
17
|
+
"@kubbisec/aspm-darwin-arm64": "1.0.2",
|
|
18
|
+
"@kubbisec/aspm-win32-x64": "1.0.2"
|
|
19
|
+
},
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=18"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"aspm",
|
|
25
|
+
"security",
|
|
26
|
+
"scanner",
|
|
27
|
+
"vulnerability",
|
|
28
|
+
"sast",
|
|
29
|
+
"sca",
|
|
30
|
+
"sbom",
|
|
31
|
+
"coverage"
|
|
32
|
+
]
|
|
33
|
+
}
|