Files
git.stella-ops.org/tests/reachability/PoE/Fixtures/log4j-cve-2021-44228.poe.golden.json
master ef933db0d8 feat(cli): Implement crypto plugin CLI architecture with regional compliance
Sprint: SPRINT_4100_0006_0001
Status: COMPLETED

Implemented plugin-based crypto command architecture for regional compliance
with build-time distribution selection (GOST/eIDAS/SM) and runtime validation.

## New Commands

- `stella crypto sign` - Sign artifacts with regional crypto providers
- `stella crypto verify` - Verify signatures with trust policy support
- `stella crypto profiles` - List available crypto providers & capabilities

## Build-Time Distribution Selection

```bash
# International (default - BouncyCastle)
dotnet build src/Cli/StellaOps.Cli/StellaOps.Cli.csproj

# Russia distribution (GOST R 34.10-2012)
dotnet build -p:StellaOpsEnableGOST=true

# EU distribution (eIDAS Regulation 910/2014)
dotnet build -p:StellaOpsEnableEIDAS=true

# China distribution (SM2/SM3/SM4)
dotnet build -p:StellaOpsEnableSM=true
```

## Key Features

- Build-time conditional compilation prevents export control violations
- Runtime crypto profile validation on CLI startup
- 8 predefined profiles (international, russia-prod/dev, eu-prod/dev, china-prod/dev)
- Comprehensive configuration with environment variable substitution
- Integration tests with distribution-specific assertions
- Full migration path from deprecated `cryptoru` CLI

## Files Added

- src/Cli/StellaOps.Cli/Commands/CryptoCommandGroup.cs
- src/Cli/StellaOps.Cli/Commands/CommandHandlers.Crypto.cs
- src/Cli/StellaOps.Cli/Services/CryptoProfileValidator.cs
- src/Cli/StellaOps.Cli/appsettings.crypto.yaml.example
- src/Cli/__Tests/StellaOps.Cli.Tests/CryptoCommandTests.cs
- docs/cli/crypto-commands.md
- docs/implplan/SPRINT_4100_0006_0001_COMPLETION_SUMMARY.md

## Files Modified

- src/Cli/StellaOps.Cli/StellaOps.Cli.csproj (conditional plugin refs)
- src/Cli/StellaOps.Cli/Program.cs (plugin registration + validation)
- src/Cli/StellaOps.Cli/Commands/CommandFactory.cs (command wiring)
- src/Scanner/__Libraries/StellaOps.Scanner.Core/Configuration/PoEConfiguration.cs (fix)

## Compliance

- GOST (Russia): GOST R 34.10-2012, FSB certified
- eIDAS (EU): Regulation (EU) No 910/2014, QES/AES/AdES
- SM (China): GM/T 0003-2012 (SM2), OSCCA certified

## Migration

`cryptoru` CLI deprecated → sunset date: 2025-07-01
- `cryptoru providers` → `stella crypto profiles`
- `cryptoru sign` → `stella crypto sign`

## Testing

 All crypto code compiles successfully
 Integration tests pass
 Build verification for all distributions (international/GOST/eIDAS/SM)

Next: SPRINT_4100_0006_0002 (eIDAS plugin implementation)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 13:13:00 +02:00

93 lines
3.3 KiB
JSON

{
"@type": "https://stellaops.dev/predicates/proof-of-exposure@v1",
"evidence": {
"graphHash": "blake3:a1b2c3d4e5f6789012345678901234567890123456789012345678901234",
"sbomRef": "cas://scanner-artifacts/sbom.cdx.json"
},
"metadata": {
"analyzer": {
"name": "stellaops-scanner",
"toolchainDigest": "sha256:def456789012345678901234567890123456789012345678901234567890",
"version": "1.2.0"
},
"generatedAt": "2025-12-23T10:00:00.000Z",
"policy": {
"evaluatedAt": "2025-12-23T09:58:00.000Z",
"policyDigest": "sha256:abc123456789012345678901234567890123456789012345678901234567",
"policyId": "prod-release-v42"
},
"reproSteps": [
"1. Build container image from Dockerfile (commit: abc123)",
"2. Run scanner with config: etc/scanner.yaml",
"3. Extract reachability graph with maxDepth=10",
"4. Resolve CVE-2021-44228 to vulnerable symbols"
]
},
"schema": "stellaops.dev/poe@v1",
"subject": {
"buildId": "gnu-build-id:5f0c7c3c4d5e6f7a8b9c0d1e2f3a4b5c",
"componentRef": "pkg:maven/org.apache.logging.log4j/log4j-core@2.14.1",
"imageDigest": "sha256:abc123def456789012345678901234567890123456789012345678901234",
"vulnId": "CVE-2021-44228"
},
"subgraph": {
"edges": [
{
"confidence": 0.98,
"from": "sym:java:com.example.GreetingService.greet",
"to": "sym:java:com.example.GreetingService.processRequest"
},
{
"confidence": 0.95,
"from": "sym:java:com.example.GreetingService.processRequest",
"to": "sym:java:org.apache.logging.log4j.Logger.error"
},
{
"confidence": 0.92,
"from": "sym:java:org.apache.logging.log4j.Logger.error",
"to": "sym:java:org.apache.logging.log4j.core.lookup.JndiLookup.lookup"
}
],
"entryRefs": [
"sym:java:com.example.GreetingService.greet"
],
"nodes": [
{
"addr": "0x401000",
"file": "GreetingService.java",
"id": "sym:java:com.example.GreetingService.greet",
"line": 42,
"moduleHash": "sha256:abc123456789012345678901234567890123456789012345678901234567",
"symbol": "com.example.GreetingService.greet(String)"
},
{
"addr": "0x401100",
"file": "GreetingService.java",
"id": "sym:java:com.example.GreetingService.processRequest",
"line": 58,
"moduleHash": "sha256:abc123456789012345678901234567890123456789012345678901234567",
"symbol": "com.example.GreetingService.processRequest(String)"
},
{
"addr": "0x402000",
"file": "Logger.java",
"id": "sym:java:org.apache.logging.log4j.Logger.error",
"line": 128,
"moduleHash": "sha256:def456789012345678901234567890123456789012345678901234567890",
"symbol": "org.apache.logging.log4j.Logger.error(String)"
},
{
"addr": "0x403000",
"file": "JndiLookup.java",
"id": "sym:java:org.apache.logging.log4j.core.lookup.JndiLookup.lookup",
"line": 56,
"moduleHash": "sha256:def456789012345678901234567890123456789012345678901234567890",
"symbol": "org.apache.logging.log4j.core.lookup.JndiLookup.lookup(LogEvent, String)"
}
],
"sinkRefs": [
"sym:java:org.apache.logging.log4j.core.lookup.JndiLookup.lookup"
]
}
}