Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
9793a8e
chore: add orchestrator temp files to .gitignore
Jstatia Feb 28, 2026
478ebca
feat: native Rust implementation of CoseSignTool with C/C++ FFI proje…
Jstatia Feb 28, 2026
94702b4
chore: clean up all Rust warnings across workspace
Jstatia Feb 28, 2026
190ffe4
feat(cli): wire ephemeral signing provider to EphemeralCertificateFac…
Jstatia Feb 28, 2026
b0bbe97
fix(cli): implement MST trust model in verify command
Jstatia Feb 28, 2026
8a9d64a
fix(cli): MST trust model skips X509 cert resolution entirely
Jstatia Mar 1, 2026
bf60491
fix(validator): bypass primary sig verification when counter-sig atte…
Jstatia Mar 2, 2026
d6da679
feat(cli): add --allow-untrusted flag for X509 verification
Jstatia Mar 2, 2026
c2d1dc2
feat(cli): embed x5chain in signed COSE + full sign/verify roundtrip
Jstatia Mar 2, 2026
133a421
fix(crypto): resolve RSA PSS algorithm mismatch for V1 C# COSE files
Jstatia Mar 2, 2026
416bb19
fix(tests): update tests for ephemeral default subject + clean warning
Jstatia Mar 2, 2026
fea1b61
refactor: minimize trusted compute boundary remove parking_lot, gate…
Jstatia Mar 2, 2026
fbc17e2
chore(native/rust): upgrade deps, replace rcgen with openssl, add PQC…
Jstatia Mar 3, 2026
ffd4d5b
feat(cli): expose PQC (ML-DSA) through CLI --algorithm flag
Jstatia Mar 3, 2026
bad5aef
fix(crypto_openssl): wire ML-DSA key detection in provider
Jstatia Mar 3, 2026
b8b03e2
chore: remove stale artifacts and legacy headers
Jstatia Mar 3, 2026
1556fdf
Add command output capture policy for all agents
Jstatia Mar 5, 2026
c3d28d5
Achieve 95% line coverage for all Rust crates
Jstatia Mar 5, 2026
00507ac
Add remaining test files from coverage effort
Jstatia Mar 5, 2026
f4e4816
Fix C++ COSE signing header compilation errors
Jstatia Mar 5, 2026
83949a7
Fix C/C++ coverage collection: CMake, paths, and Debug default
Jstatia Mar 5, 2026
9fe632a
Add composable C++ pack registration free functions
Jstatia Mar 5, 2026
ed140b1
Update native docs to match actual C++ API
Jstatia Mar 6, 2026
e429063
Rewrite C/C++ examples with correct API and fix header conflicts
Jstatia Mar 6, 2026
80cf1f4
Merge native_ports into native_ports_pr: resolve conflicts, remove le…
Jstatia Mar 10, 2026
14c0a77
Rename Azure Trusted Signing to Azure Artifact Signing in native/
Jstatia Mar 10, 2026
507f446
feat(MST): add polling options, CBOR problem details, fix auth header
Jstatia Mar 11, 2026
cf0e6ee
feat(MST): add TransactionNotCached fast-retry for get_entry_statement
Jstatia Mar 11, 2026
7576fa1
refactor(MST): extract CodeTransparencyClient into proper Azure SDK c…
Jstatia Mar 11, 2026
c484f55
feat(MST): add Poller-based LRO, JwksDocument, offline keys, resolve_…
Jstatia Mar 12, 2026
b9258e2
feat(MST): add verification options, receipt extraction, VerifyTransp…
Jstatia Mar 12, 2026
24f25e0
feat(MST): add JWKS key cache for fast online verification
Jstatia Mar 12, 2026
edff463
feat(native): JWK verifier factory, ring removal, FFI projection, 90%…
Jstatia Mar 16, 2026
a951b32
refactor: remove partner/ directory, restore cose_openssl workspace m…
Jstatia Mar 16, 2026
158f889
Merge remote-tracking branch 'origin/users/jstatia/native_ports' into…
Jstatia Mar 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 19 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,24 @@ public class ExampleCommand : PluginCommandBase
}
```

## Command Execution Efficiency (MANDATORY)

**Never re-run an expensive command (build, test, lint, coverage) just to apply a different text filter.**

All long-running commands MUST capture full output to a file on the first run, then search that file for subsequent analysis. See `.github/instructions/command-output-capture.instructions.md` for the full policy.

Quick reference:
```powershell
# CORRECT: Capture once, search many times
cargo test --workspace 2>&1 | Out-File -FilePath "$env:TEMP\test-output.txt" -Encoding utf8
Select-String -Path "$env:TEMP\test-output.txt" -Pattern "FAILED"
Select-String -Path "$env:TEMP\test-output.txt" -Pattern "error"

# WRONG: Re-running the same command with different filters
cargo test --workspace 2>&1 | Select-String "FAILED" # run 1: 10 minutes
cargo test --workspace 2>&1 | Select-String "error" # run 2: 10 minutes WASTED
```

## Summary
When generating code for this repository, always:
1. Include the Microsoft copyright header
Expand All @@ -222,3 +240,4 @@ When generating code for this repository, always:
8. Follow the formatting and spacing rules exactly as specified
9. Include comprehensive XML documentation for public APIs
10. Ensure all generated code follows the .editorconfig rules
11. Capture long-running command output to files — never re-run just to filter differently
134 changes: 134 additions & 0 deletions .github/evidence/build-verification-cb4acf58.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# Build Verification Evidence - Task cb4acf58

**Date**: 2026-02-20T02:39:49.512Z
**Task**: Final verification of Rust FFI, C, and C++ builds

## Summary

✅ **Rust FFI Build**: SUCCESSFUL
❌ **C Project Build**: NOT COMPLETED (CMake not accessible)
❌ **C++ Project Build**: NOT COMPLETED (CMake not accessible)

## Details

### 1. Rust FFI Crates Build

**Command**: `cd native/rust; cargo build --release --workspace`
**Result**: ✅ SUCCESS
**Exit Code**: 0

**Toolchain Information**:
- Cargo version: 1.90.0 (840b83a10 2025-07-30)
- Rustc version: 1.90.0 (1159e78c4 2025-09-14)

**Built Libraries** (native/rust/target/release/):

#### Static Libraries (.lib)
- `cose_sign1_azure_key_vault_ffi.lib` - 32.99 MB
- `cose_sign1_certificates_ffi.lib` - 30.79 MB
- `cose_sign1_headers_ffi.lib` - 14.65 MB
- `cose_sign1_primitives_ffi.lib` - 14.63 MB
- `cose_sign1_signing_ffi.lib` - 14.95 MB
- `cose_sign1_transparent_mst_ffi.lib` - 36.01 MB
- `cose_sign1_validation_ffi.lib` - 23.91 MB
- `cose_sign1_validation_primitives_ffi.lib` - 24.78 MB

#### Dynamic Libraries (.dll)
- `cose_sign1_azure_key_vault_ffi.dll` - 2.88 MB
- `cose_sign1_certificates_ffi.dll` - 3.09 MB
- `cose_sign1_headers_ffi.dll` - 186 KB
- `cose_sign1_primitives_ffi.dll` - 220 KB
- `cose_sign1_signing_ffi.dll` - 287 KB
- `cose_sign1_transparent_mst_ffi.dll` - 4.50 MB
- `cose_sign1_validation_ffi.dll` - 2.14 MB
- `cose_sign1_validation_primitives_ffi.dll` - 2.41 MB
- `did_x509_ffi.dll` - 589 KB

#### Import Libraries (.dll.lib)
- All corresponding import libraries generated successfully

**All FFI crates compiled successfully** with no errors. Libraries are ready for linking with C/C++ consumers.

### 2. C Project Build

**Command**: `cd native/c; cmake -B build -DCMAKE_PREFIX_PATH=../rust/target/release`
**Result**: ❌ NOT COMPLETED
**Reason**: CMake not accessible in current environment

**Details**:
- CMake is required (version 3.20 or later per native/c/README.md)
- `where.exe cmake` returned: "Could not find files for the given pattern(s)"
- Visual Studio 18 Enterprise is installed at `C:\Program Files\Microsoft Visual Studio\18\Enterprise`
- CMake may be present in Visual Studio installation but not in system PATH
- File permission restrictions prevented locating CMake in Program Files

**Required Prerequisites** (from native/c/README.md):
- CMake 3.20 or later ❌ (not in PATH)
- C11-capable compiler (MSVC, GCC, Clang) ✅ (VS 18 available)
- Rust toolchain ✅ (completed)

### 3. C++ Project Build

**Command**: `cd native/c_pp; cmake -B build -DCMAKE_PREFIX_PATH=../rust/target/release`
**Result**: ❌ NOT COMPLETED
**Reason**: Same as C project - CMake not accessible

## Analysis

### What Succeeded
1. ✅ All Rust FFI crates built successfully in release mode
2. ✅ Static libraries generated for all packs
3. ✅ Dynamic libraries (DLLs) generated for all packs
4. ✅ Import libraries (.dll.lib) generated for Windows linking
5. ✅ No build errors or warnings in Rust compilation

### What Remains
The C and C++ projects require CMake to configure and build. The build system cannot proceed without:
- CMake being added to system PATH, OR
- Explicitly calling CMake from its Visual Studio installation location

### Verification of FFI Completeness
All expected FFI crates were built:
- **Base**: cose_sign1_primitives_ffi, cose_sign1_headers_ffi, cose_sign1_signing_ffi
- **Validation**: cose_sign1_validation_ffi, cose_sign1_validation_primitives_ffi
- **Certificates Pack**: cose_sign1_certificates_ffi
- **MST Pack**: cose_sign1_transparent_mst_ffi
- **AKV Pack**: cose_sign1_azure_key_vault_ffi
- **DID**: did_x509_ffi

## Recommendations

To complete the verification:

1. **Option A**: Install CMake and add to PATH
```powershell
# Download from https://cmake.org/download/ or use winget
winget install Kitware.CMake
```

2. **Option B**: Use CMake from Visual Studio
```powershell
$env:PATH += ";C:\Program Files\Microsoft Visual Studio\18\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin"
cmake --version
```

3. **Option C**: Use Visual Studio Developer PowerShell
- Launch "Developer PowerShell for VS 2022"
- Run the build commands in that environment

Once CMake is accessible, the build can proceed with:
```bash
# C project
cd native/c
cmake -B build -DCMAKE_PREFIX_PATH=../rust/target/release
cmake --build build --config Release

# C++ project
cd native/c_pp
cmake -B build -DCMAKE_PREFIX_PATH=../rust/target/release
cmake --build build --config Release
```

## Conclusion

**Partial Success**: The Rust FFI layer (Layer 1) is fully built and ready. The C (Layer 2) and C++ (Layer 3) projections cannot be built without CMake being accessible in the current environment. All Rust artifacts are present and correct for consumption by the C/C++ layers once the build environment is properly configured.
138 changes: 138 additions & 0 deletions .github/instructions/command-output-capture.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# Command Output Capture Policy — All Agents

> **Applies to:** `**` (all files, all agents, all tasks in this repository)

## Mandatory Rule: Capture Once, Search the File

**Tests, builds, and coverage commands in this repository are expensive — often taking minutes or tens of minutes to complete.** Agents MUST capture full command output to a file on the first execution, then search/filter/reason over that file for all subsequent analysis. **Re-running the same command with a different filter is strictly prohibited.**

## The Problem This Solves

❌ **PROHIBITED pattern** — re-running a command to filter differently:
```powershell
# First run: agent pipes to Select-String looking for errors
cargo test --workspace 2>&1 | Select-String "FAILED"

# Second run: same command, different filter (WASTING MINUTES)
cargo test --workspace 2>&1 | Select-String "error\[E"

# Third run: same command, yet another filter (COMPLETELY UNACCEPTABLE)
cargo test --workspace 2>&1 | Select-String "test result"
```

Each of those runs takes the **full execution time** of the command. Three filter passes on a 10-minute test suite wastes 20 minutes.

## Required Pattern: Capture Full Output to a File

✅ **REQUIRED pattern** — run once, capture everything, search the file:
```powershell
# Step 1: Run the command ONCE, capture ALL output (stdout + stderr) to a file
cargo test --workspace 2>&1 | Out-File -FilePath "$env:TEMP\test-output.txt" -Encoding utf8

# Step 2: Search the captured file as many times as needed (instant)
Select-String -Path "$env:TEMP\test-output.txt" -Pattern "FAILED"
Select-String -Path "$env:TEMP\test-output.txt" -Pattern "error\[E"
Select-String -Path "$env:TEMP\test-output.txt" -Pattern "test result"
Get-Content "$env:TEMP\test-output.txt" | Select-String "warning"
```

## Specific Rules

### 1. All Long-Running Commands MUST Capture to File

Any command that takes more than ~10 seconds MUST have its full output captured to a temporary file. This includes but is not limited to:

| Command Type | Examples |
|---|---|
| Test suites | `cargo test`, `dotnet test`, `npm test`, `pytest` |
| Builds | `cargo build`, `dotnet build`, `msbuild`, `npm run build` |
| Coverage | `cargo llvm-cov`, `dotnet test --collect`, coverage scripts |
| Linting | `cargo clippy`, `dotnet format`, `eslint` |
| Package restore | `cargo fetch`, `dotnet restore`, `npm install` |
| Any CI script | `collect-coverage.ps1`, or any orchestrating script |

### 2. Capture Syntax

Use one of these patterns to capture output:

**PowerShell (preferred in this repo):**
```powershell
# Capture stdout + stderr to file
<command> 2>&1 | Out-File -FilePath "$env:TEMP\<descriptive-name>.txt" -Encoding utf8

# Or use Tee-Object if you also want to see live output
<command> 2>&1 | Tee-Object -FilePath "$env:TEMP\<descriptive-name>.txt"
```

**Bash/Shell:**
```bash
<command> > /tmp/<descriptive-name>.txt 2>&1
```

**Rust/Cargo specific:**
```powershell
cargo test --workspace --no-fail-fast 2>&1 | Out-File -FilePath "$env:TEMP\cargo-test-output.txt" -Encoding utf8
cargo clippy --workspace 2>&1 | Out-File -FilePath "$env:TEMP\cargo-clippy-output.txt" -Encoding utf8
```

### 3. Search the File, NOT Re-Run the Command

After capturing, use these tools to analyze the output file:

```powershell
# Find specific patterns
Select-String -Path "$env:TEMP\cargo-test-output.txt" -Pattern "FAILED|error"

# Count occurrences
(Select-String -Path "$env:TEMP\cargo-test-output.txt" -Pattern "test result").Count

# Get context around matches
Select-String -Path "$env:TEMP\cargo-test-output.txt" -Pattern "FAILED" -Context 5,5

# Read specific line ranges
Get-Content "$env:TEMP\cargo-test-output.txt" | Select-Object -Skip 100 -First 50

# Get summary (tail)
Get-Content "$env:TEMP\cargo-test-output.txt" -Tail 50
```

### 4. When Re-Running IS Allowed

A command may only be re-executed if:
- The **source code has been modified** since the last run (i.e., you are testing a fix)
- The command **genuinely needs different arguments** (e.g., different `--package`, different test filter)
- The previous output file was **lost or corrupted**
- You need output from a **different command entirely**

A command MUST NOT be re-executed merely to:
- Apply a different `Select-String`, `grep`, `findstr`, or `Where-Object` filter
- See a different portion of the same output
- Count or summarize results differently
- Reformat or restructure the same data

### 5. File Naming Convention

Use descriptive names in `$env:TEMP` (or `/tmp` on Unix):
```
$env:TEMP\cargo-test-output.txt
$env:TEMP\cargo-clippy-output.txt
$env:TEMP\dotnet-build-output.txt
$env:TEMP\coverage-output.txt
```

### 6. Cleanup

Delete temporary output files when the task is complete:
```powershell
Remove-Item "$env:TEMP\cargo-test-output.txt" -ErrorAction SilentlyContinue
Remove-Item "$env:TEMP\cargo-clippy-output.txt" -ErrorAction SilentlyContinue
```

## Summary

| Step | Action |
|------|--------|
| **Run** | Execute the command **once**, redirect all output to a file |
| **Search** | Use `Select-String`, `Get-Content`, `grep` on the **file** |
| **Iterate** | Modify code → re-run command → capture to file again |
| **Never** | Re-run the same command just to apply a different text filter |
Loading
Loading