chore: publish IntegraCI build modules 732ec6c83925
This commit is contained in:
1 parent
7a84930dea
commit
5f8a24d014
133 files changed
+18990
-2
No files matched your search
@@ -0,0 +1,49 @@
|
||||
# secret-scan
|
||||
|
||||
Engine-agnostic IntegraCI Dagger module for **secret / credential detection**.
|
||||
Catches committed credentials and keys before they ship — a best-practice
|
||||
gate every service should run, callable from any CI engine via `dagger call`.
|
||||
|
||||
Translates `security_pipeline_adapter.build_secret_scan_step` (which renders
|
||||
GitHub-Actions YAML) into portable container-exec recipes.
|
||||
|
||||
## Verb
|
||||
|
||||
### `scan`
|
||||
|
||||
```
|
||||
dagger call scan --source . [--tool gitleaks|trufflehog|detect-secrets|none]
|
||||
```
|
||||
|
||||
| Arg | Type | Default | Description |
|
||||
| -------- | ----------- | ---------- | --------------------------------------------- |
|
||||
| `source` | `Directory` | (required) | Source tree to scan |
|
||||
| `tool` | `String` | `gitleaks` | Scanner to run |
|
||||
|
||||
## Tools
|
||||
|
||||
| Tool | Image | Command |
|
||||
| ---------------- | --------------------------------- | --------------------------------------------------------------- |
|
||||
| `gitleaks` | `zricethezav/gitleaks` | `detect --source=/src --no-git -v` |
|
||||
| `trufflehog` | `trufflesecurity/trufflehog` | `filesystem /src --results=verified,unknown --fail` |
|
||||
| `detect-secrets` | `python:3.12-slim` | `pip install detect-secrets && detect-secrets scan --all-files` |
|
||||
| `none` | — (no-op) | skip (mirrors `governance.secret_scan=none`) |
|
||||
|
||||
## Result (`ScanResult`)
|
||||
|
||||
```json
|
||||
{ "tool": "gitleaks", "skipped": false, "findings": 0, "report": "...", "pass": true }
|
||||
```
|
||||
|
||||
Tools exit non-zero when secrets are found; the module swallows that exit,
|
||||
captures the report, and surfaces `pass` / `findings` so the calling CI
|
||||
engine decides how to gate the pipeline.
|
||||
|
||||
## Examples
|
||||
|
||||
```bash
|
||||
dagger call scan --source .
|
||||
dagger call scan --source . --tool trufflehog
|
||||
dagger call scan --source . --tool detect-secrets
|
||||
dagger call scan --source . --tool none
|
||||
```
|
||||
Reference in new issue
Block a user