refactor(audit): replace magic strings with AuditModules/AuditActions constants
- Replace 349 .Audited("module", "action") calls with typed constants across 91 files
- Add 21 missing action constants to AuditActions.cs (Policy, Attestor, Evidence, Scanner)
- Compile-time safety for module/action naming across all 15 services
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -93,6 +93,13 @@ public static class AuditActions
|
||||
public const string CreateConflict = "create_conflict";
|
||||
public const string CreateDeltaSnapshot = "create_delta_snapshot";
|
||||
public const string EvaluateGate = "evaluate_gate";
|
||||
public const string AppendViolation = "append_violation";
|
||||
public const string AppendViolationBatch = "append_violation_batch";
|
||||
public const string CreateVerificationPolicy = "create_verification_policy";
|
||||
public const string UpdateVerificationPolicy = "update_verification_policy";
|
||||
public const string DeleteVerificationPolicy = "delete_verification_policy";
|
||||
public const string EscalateUnknown = "escalate_unknown";
|
||||
public const string ResolveUnknown = "resolve_unknown";
|
||||
}
|
||||
|
||||
/// <summary>Actions for the Scanner module.</summary>
|
||||
@@ -129,6 +136,7 @@ public static class AuditActions
|
||||
public const string Reconcile = "reconcile";
|
||||
public const string AttachEntropy = "attach_entropy";
|
||||
public const string AttachReplay = "attach_replay";
|
||||
public const string GenerateVex = "generate_vex";
|
||||
}
|
||||
|
||||
/// <summary>Actions for the Findings module.</summary>
|
||||
@@ -243,6 +251,9 @@ public static class AuditActions
|
||||
public const string Snapshot = "snapshot";
|
||||
public const string Verify = "verify";
|
||||
public const string Hold = "hold";
|
||||
public const string StoreVerdict = "store_verdict";
|
||||
public const string VerifyVerdict = "verify_verdict";
|
||||
public const string Export = "export";
|
||||
}
|
||||
|
||||
/// <summary>Actions for the Attestor (Signer) module.</summary>
|
||||
@@ -256,6 +267,16 @@ public static class AuditActions
|
||||
public const string ApproveCeremony = "approve_ceremony";
|
||||
public const string ExecuteCeremony = "execute_ceremony";
|
||||
public const string CancelCeremony = "cancel_ceremony";
|
||||
public const string CreateWatchlistEntry = "create_watchlist_entry";
|
||||
public const string UpdateWatchlistEntry = "update_watchlist_entry";
|
||||
public const string DeleteWatchlistEntry = "delete_watchlist_entry";
|
||||
public const string ExportAttestation = "export_attestation";
|
||||
public const string ImportAttestation = "import_attestation";
|
||||
public const string SignAttestation = "sign_attestation";
|
||||
public const string CreateIntotoLink = "create_intoto_link";
|
||||
public const string SubmitRekorEntry = "submit_rekor_entry";
|
||||
public const string CreateBulkVerification = "create_bulk_verification";
|
||||
public const string ExportBuildAttestation = "export_build_attestation";
|
||||
}
|
||||
|
||||
/// <summary>Actions for the Integrations module.</summary>
|
||||
|
||||
Reference in New Issue
Block a user