Add signal contracts for reachability, exploitability, trust, and unknown symbols
- Introduced `ReachabilityState`, `RuntimeHit`, `ExploitabilitySignal`, `ReachabilitySignal`, `SignalEnvelope`, `SignalType`, `TrustSignal`, and `UnknownSymbolSignal` records to define various signal types and their properties. - Implemented JSON serialization attributes for proper data interchange. - Created project files for the new signal contracts library and corresponding test projects. - Added deterministic test fixtures for micro-interaction testing. - Included cryptographic keys for secure operations with cosign.
This commit is contained in:
@@ -2,46 +2,82 @@
|
||||
|
||||
Artifacts prepared 2025-12-01 (UTC) for DSSE signing and Evidence Locker ingest:
|
||||
|
||||
- Decay config: `docs/modules/signals/decay/confidence_decay_config.yaml`
|
||||
- Unknowns scoring manifest: `docs/modules/signals/unknowns/unknowns_scoring_manifest.json`
|
||||
- Heuristic catalog + schema + fixtures: `docs/modules/signals/heuristics/`
|
||||
- Checksums: `docs/modules/signals/SHA256SUMS`
|
||||
| Artifact | Path | Predicate |
|
||||
|----------|------|-----------|
|
||||
| Decay config | `docs/modules/signals/decay/confidence_decay_config.yaml` | `stella.ops/confidenceDecayConfig@v1` |
|
||||
| Unknowns manifest | `docs/modules/signals/unknowns/unknowns_scoring_manifest.json` | `stella.ops/unknownsScoringManifest@v1` |
|
||||
| Heuristics catalog | `docs/modules/signals/heuristics/heuristics.catalog.json` | `stella.ops/heuristicCatalog@v1` |
|
||||
| Checksums | `docs/modules/signals/SHA256SUMS` | — |
|
||||
|
||||
Planned Evidence Locker paths (to fill post-signing):
|
||||
- `evidence-locker/signals/decay/2025-12-01/confidence_decay_config.dsse`
|
||||
- `evidence-locker/signals/unknowns/2025-12-01/unknowns_scoring_manifest.dsse`
|
||||
- `evidence-locker/signals/heuristics/2025-12-01/heuristics_catalog.dsse`
|
||||
- `evidence-locker/signals/heuristics/2025-12-01/fixtures/` (golden inputs/outputs)
|
||||
## CI Automated Signing
|
||||
|
||||
Pending steps:
|
||||
0) Provide signing key: CI/ops should supply `COSIGN_PRIVATE_KEY_B64` (base64 of private key) and optional `COSIGN_PASSWORD`. Local dev can place a key at `tools/cosign/cosign.key` (see `tools/cosign/cosign.key.example` stub) or decode the env var to `/tmp/cosign.key`. The helper script `tools/cosign/sign-signals.sh` auto-detects the key and cosign version.
|
||||
1) Sign each artifact with its predicate (cosign v3.0.2 in `/usr/local/bin`, use `--bundle`; v2.6.0 fallback in `tools/cosign` also works with `--output-signature`):
|
||||
- `stella.ops/confidenceDecayConfig@v1`
|
||||
- `stella.ops/unknownsScoringManifest@v1`
|
||||
- `stella.ops/heuristicCatalog@v1`
|
||||
Shortcut: `OUT_DIR=evidence-locker/signals/2025-12-01 tools/cosign/sign-signals.sh`
|
||||
Example (v3, replace KEY):
|
||||
```bash
|
||||
cosign sign-blob \
|
||||
--key cosign.key \
|
||||
--predicate-type stella.ops/confidenceDecayConfig@v1 \
|
||||
--bundle confidence_decay_config.sigstore.json \
|
||||
decay/confidence_decay_config.yaml
|
||||
```
|
||||
v2.6.0 fallback (if PATH prefixed with `tools/cosign`):
|
||||
```bash
|
||||
cosign sign-blob \
|
||||
--key cosign.key \
|
||||
--predicate-type stella.ops/confidenceDecayConfig@v1 \
|
||||
--output-signature confidence_decay_config.dsse \
|
||||
decay/confidence_decay_config.yaml
|
||||
```
|
||||
2) Record SHA256 from `SHA256SUMS` in DSSE annotations (or bundle metadata); keep canonical filenames:
|
||||
- v3: `confidence_decay_config.sigstore.json`, `unknowns_scoring_manifest.sigstore.json`, `heuristics_catalog.sigstore.json`
|
||||
- v2 fallback: `.dsse` signatures.
|
||||
3) Place signed envelopes + checksums in the Evidence Locker paths above; update sprint tracker Delivery Tracker rows 5–7 and Decisions & Risks with the final URIs.
|
||||
4) Add signer/approver IDs to the sprint Execution Log once signatures are complete.
|
||||
The `.gitea/workflows/signals-dsse-sign.yml` workflow automates DSSE signing.
|
||||
|
||||
Notes:
|
||||
- Use UTC timestamps in DSSE `issuedAt`.
|
||||
- Ensure offline parity by copying envelopes + SHA256SUMS into the offline kit bundle when ready.
|
||||
### Prerequisites (CI Secrets)
|
||||
| Secret | Description |
|
||||
|--------|-------------|
|
||||
| `COSIGN_PRIVATE_KEY_B64` | Base64-encoded cosign private key (required for production) |
|
||||
| `COSIGN_PASSWORD` | Password for encrypted key (if applicable) |
|
||||
| `CI_EVIDENCE_LOCKER_TOKEN` | Token for Evidence Locker push (optional) |
|
||||
|
||||
### Trigger
|
||||
- **Automatic**: Push to `main` affecting `docs/modules/signals/**` or `tools/cosign/sign-signals.sh`
|
||||
- **Manual**: Workflow dispatch with `allow_dev_key=1` for testing
|
||||
|
||||
### Output
|
||||
Signed artifacts uploaded as workflow artifact `signals-dsse-signed-{run}` and optionally pushed to Evidence Locker.
|
||||
|
||||
## Development Signing (Local Testing)
|
||||
|
||||
A development key pair is available for smoke tests:
|
||||
|
||||
```bash
|
||||
# Sign with dev key
|
||||
COSIGN_ALLOW_DEV_KEY=1 COSIGN_PASSWORD=stellaops-dev \
|
||||
OUT_DIR=docs/modules/signals/dev-test \
|
||||
tools/cosign/sign-signals.sh
|
||||
|
||||
# Verify signature
|
||||
cosign verify-blob \
|
||||
--key tools/cosign/cosign.dev.pub \
|
||||
--bundle docs/modules/signals/dev-test/confidence_decay_config.sigstore.json \
|
||||
docs/modules/signals/decay/confidence_decay_config.yaml
|
||||
```
|
||||
|
||||
**Note**: Dev key signatures are NOT suitable for Evidence Locker or production use.
|
||||
|
||||
## Production Signing (Manual)
|
||||
|
||||
For production signing without CI:
|
||||
|
||||
```bash
|
||||
# Option 1: Place key file
|
||||
cp /path/to/production.key tools/cosign/cosign.key
|
||||
OUT_DIR=evidence-locker/signals/2025-12-01 tools/cosign/sign-signals.sh
|
||||
|
||||
# Option 2: Use base64 env var
|
||||
export COSIGN_PRIVATE_KEY_B64=$(cat production.key | base64 -w0)
|
||||
export COSIGN_PASSWORD=your-password
|
||||
OUT_DIR=evidence-locker/signals/2025-12-01 tools/cosign/sign-signals.sh
|
||||
```
|
||||
|
||||
## Evidence Locker Paths
|
||||
|
||||
Post-signing, artifacts go to:
|
||||
- `evidence-locker/signals/2025-12-01/confidence_decay_config.sigstore.json`
|
||||
- `evidence-locker/signals/2025-12-01/unknowns_scoring_manifest.sigstore.json`
|
||||
- `evidence-locker/signals/2025-12-01/heuristics_catalog.sigstore.json`
|
||||
- `evidence-locker/signals/2025-12-01/SHA256SUMS`
|
||||
|
||||
## Post-Signing Checklist
|
||||
|
||||
1. Verify signatures against public key
|
||||
2. Update sprint tracker (SPRINT_0140) Delivery Tracker rows 5–7
|
||||
3. Add signer ID to Execution Log
|
||||
4. Copy to offline kit bundle for air-gap parity
|
||||
|
||||
## Notes
|
||||
|
||||
- All timestamps use UTC ISO-8601 format
|
||||
- Signatures disable tlog upload (`--tlog-upload=false`) for offline compatibility
|
||||
- See `tools/cosign/README.md` for detailed key management and CI setup
|
||||
|
||||
Reference in New Issue
Block a user