Skip to content

build(go): regenerate against traust-contracts#189 — the not_affected section - #93

Merged
chubirka merged 5 commits into
developmentfrom
build/contracts-189-not-affected
Nov 25, 2026
Merged

chubirka merged 5 commits into
developmentfrom
build/contracts-189-not-affected

Conversation

@chubirka

Copy link
Copy Markdown
Member

What

Regenerates the Go types against traust-contracts 369a2ab (traust-contracts#189's branch head). That adds the report not_affected section (Report.NotAffected, VulnFindings.NotAffected), so a Go client keeps eliminated advisory matches and their rationale on a round-trip. That covers SCI's report reads. Qodo raised this on #189.

The pin is a branch commit, the same practice as contracts#117. It re-pins to #189's merge commit after that lands. Most of the 219-file diff is the regenerated contracts-ref header.

Plan: CVSS remediation plan, step 12 (traust-foundry/plans/traust/cvss/sci-cvss-severity-remediation-plan-2026-11-18.md).

Tests

  • New: TestReportNotAffectedRoundTrip. A report with the section validates, round-trips and re-validates.
  • go test ./... and go vet pass, and make check-drift is clean.

🤖 Generated with Claude Code

…cted section

traust-contracts#189 adds a report `not_affected` section (eliminated
advisory matches with their dependency evidence and rationale) to
report.schema.json and vuln-findings.schema.json. Regenerated types carry
it (Report.NotAffected, VulnFindings.NotAffected), so a Go client — SCI's
report reads — keeps it on a round-trip. Branch commit pinned; re-pin to
#189's merge commit after it lands. Test: a report with the section
validates, round-trips and re-validates.

Remediation plan step 12 (traust-foundry
plans/traust/cvss/sci-cvss-severity-remediation-plan-2026-11-18.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chubirka
chubirka requested a review from smith-xyz as a code owner November 24, 2026 22:06
@openshift-ci

openshift-ci Bot commented Nov 24, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chubirka

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 24, 2026
@qodo-for-traust-sci

Copy link
Copy Markdown

PR Summary by Qodo

Regenerate Go contracts to preserve not_affected report entries

✨ Enhancement 🐞 Bug fix 🧪 Tests ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Add typed not_affected sections so Go clients retain eliminated advisory matches and their
 rationale.
Diagram

graph TD
  A["Pinned contracts"] --> B["Go generator"] --> C["Report types"] --> E["Go client"]
  B --> D["Embedded schemas"] --> F["Schema validation"]
  E --> F
Loading
High-Level Assessment

Regenerating from the authoritative contracts is preferable to hand-editing generated types or retaining the section in an untyped extension field. Re-pin the branch-head commit to the contracts PR's merge commit when available.

Files changed (220) +298 / -230

Enhancement (4) +35 / -14
report.goRepresent eliminated matches in reports +8/-1

Represent eliminated matches in reports

• Adds the optional Report.NotAffected slice and NotAffectedEntry with dependency evidence, required rationale, and optional reference. Refreshes generated provenance.

go/v1/types/report.go

run-manifest.goExpose run-manifest outputs +2/-1

Expose run-manifest outputs

• Regeneration adds an optional Outputs string slice to RunManifest alongside the provenance update.

go/v1/types/run-manifest.go

vuln-findings.goRepresent eliminated matches in vulnerability scans +16/-9

Represent eliminated matches in vulnerability scans

• Adds optional VulnFindings.NotAffected entries carrying dependency evidence, rationale, and an optional reference. Refreshes generated provenance.

go/v1/types/vuln-findings.go

schemas_gen.goEmbed regenerated contract schemas +9/-3

Embed regenerated contract schemas

• Refreshes the embedded report, vulnerability-findings, and run-manifest schemas from the pinned contracts revision, including validation of not_affected entries and run-manifest outputs.

go/v1/validate/schemas_gen.go

Tests (1) +47 / -0
roundtrip_test.goTest report not_affected round-trip +47/-0

Test report not_affected round-trip

• Constructs a report with an eliminated advisory match, validates it, decodes and re-encodes it, then validates again. Checks that its rationale and advisory survive.

go/v1/types/roundtrip_test.go

Other (215) +216 / -216
MakefilePin the new contracts commit +1/-1

Pin the new contracts commit

• Changes the generation source to traust-contracts 369a2ab2c9b65225c6878eca75bada6a65df548f.

go/Makefile

actor_kind.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/actor_kind.go

adr_declared_status.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/adr_declared_status.go

alias_matched_by.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/alias_matched_by.go

assessment_kind.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/assessment_kind.go

audit_profile.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/audit_profile.go

below_range_candidate_kind.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/below_range_candidate_kind.go

below_range_gap_reason.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/below_range_gap_reason.go

below_range_status.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/below_range_status.go

below_range_verdict.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/below_range_verdict.go

benchmark_target_embargo.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/benchmark_target_embargo.go

benchmark_target_evidence_kind.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/benchmark_target_evidence_kind.go

benchmark_target_injection_class.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/benchmark_target_injection_class.go

benchmark_target_provenance.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/benchmark_target_provenance.go

budget_enforcement.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/budget_enforcement.go

budget_status.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/budget_status.go

chain_severity.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/chain_severity.go

cia_impact.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/cia_impact.go

cloud_config_finding_status.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/cloud_config_finding_status.go

cloud_provider.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/cloud_provider.go

comparison_status.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/comparison_status.go

compliance_assertion_operator.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/compliance_assertion_operator.go

compliance_control_catalog.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/compliance_control_catalog.go

compliance_control_classification.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/compliance_control_classification.go

compliance_evidence_kind.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/compliance_evidence_kind.go

compliance_framework.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/compliance_framework.go

compliance_scope_resolves_via.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/compliance_scope_resolves_via.go

compliance_target_kind.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/compliance_target_kind.go

compliance_target_resolves_via.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/compliance_target_resolves_via.go

compliance_verdict.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/compliance_verdict.go

compliance_verdict_source.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/compliance_verdict_source.go

cross_repo_propagation.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/cross_repo_propagation.go

crypto_governance_class.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/crypto_governance_class.go

cve_replay_verdict.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/cve_replay_verdict.go

cvss_attack_vector.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/cvss_attack_vector.go

cvss_privileges_required.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/cvss_privileges_required.go

cvss_user_interaction.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/cvss_user_interaction.go

decision_reason.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/decision_reason.go

degraded_key.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/degraded_key.go

deny_code.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/deny_code.go

dependency_evidence_level.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/dependency_evidence_level.go

discovery_method.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/discovery_method.go

disposition_assurance.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/disposition_assurance.go

disposition_embargo.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/disposition_embargo.go

disposition_resolution.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/disposition_resolution.go

doc_variance_disposition.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/doc_variance_disposition.go

doc_variance_kind.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/doc_variance_kind.go

ecosystem.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/ecosystem.go

effort.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/effort.go

entry_point_kind.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/entry_point_kind.go

event_validity.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/event_validity.go

evidence_grade.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/evidence_grade.go

execution_sandbox.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/execution_sandbox.go

external_ref_confidence.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/external_ref_confidence.go

external_ref_system.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/external_ref_system.go

feed_tier.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/feed_tier.go

file_change_type.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/file_change_type.go

finding_kind.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/finding_kind.go

finding_origin.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/finding_origin.go

fix_strategy.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/fix_strategy.go

fleet_fix_matcher_kind.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/fleet_fix_matcher_kind.go

fork_host.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/fork_host.go

fork_visibility.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/fork_visibility.go

fuzz_crash_class.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/fuzz_crash_class.go

fuzz_engine.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/fuzz_engine.go

fuzz_gap_reason.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/fuzz_gap_reason.go

fuzz_run_outcome.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/fuzz_run_outcome.go

fuzz_sanitizer.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/fuzz_sanitizer.go

identity_source.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/identity_source.go

impact_classification.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/impact_classification.go

impact_evidence_binary_linked_library.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/impact_evidence_binary_linked_library.go

impact_evidence_binary_string_scan.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/impact_evidence_binary_string_scan.go

impact_evidence_binary_symbol_scan.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/impact_evidence_binary_symbol_scan.go

impact_evidence_govulncheck.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/impact_evidence_govulncheck.go

impact_evidence_manifest_scan.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/impact_evidence_manifest_scan.go

impact_evidence_sbom_scan.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/impact_evidence_sbom_scan.go

impact_evidence_source_import_scan.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/impact_evidence_source_import_scan.go

impact_evidence_symbol_usage_scan.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/impact_evidence_symbol_usage_scan.go

impact_tier.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/impact_tier.go

interface_complexity.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/interface_complexity.go

interface_exposure.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/interface_exposure.go

interface_kind.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/interface_kind.go

interface_role.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/interface_role.go

internal_vocabulary_tier.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/internal_vocabulary_tier.go

isolation_check_result.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/isolation_check_result.go

isolation_dimension.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/isolation_dimension.go

isolation_posture.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/isolation_posture.go

layer_review_queue_reason.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/layer_review_queue_reason.go

liveness_status.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/liveness_status.go

logging_output.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/logging_output.go

manifest_coverage_reason.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/manifest_coverage_reason.go

mitigation_closes_class.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/mitigation_closes_class.go

mitigation_effort.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/mitigation_effort.go

normalization_gen.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/normalization_gen.go

osv_access.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/osv_access.go

owasp_impact_basis.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/owasp_impact_basis.go

owasp_llm_category.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/owasp_llm_category.go

ownership.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/ownership.go

pack_required_config.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/pack_required_config.go

pack_required_fact.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/pack_required_fact.go

patch_evidence_kind.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/patch_evidence_kind.go

peach_boundary_type.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/peach_boundary_type.go

positive_control_kind.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/positive_control_kind.go

pqc_blast_radius.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/pqc_blast_radius.go

pqc_caveat_type.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/pqc_caveat_type.go

pqc_classification.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/pqc_classification.go

pqc_dominant_provenance.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/pqc_dominant_provenance.go

pqc_facts_assessment_basis.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/pqc_facts_assessment_basis.go

pqc_fips_interaction.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/pqc_fips_interaction.go

pqc_path_class.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/pqc_path_class.go

pqc_provenance.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/pqc_provenance.go

pqc_readiness_assessment_basis.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/pqc_readiness_assessment_basis.go

pqc_readiness_bucket.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/pqc_readiness_bucket.go

pqc_remediation_category.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/pqc_remediation_category.go

pqc_scoring_ceiling.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/pqc_scoring_ceiling.go

pqc_vendor_class.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/pqc_vendor_class.go

pqc_vendor_status.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/pqc_vendor_status.go

precision_gate_action.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/precision_gate_action.go

pull_request_state.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/pull_request_state.go

pull_request_target.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/pull_request_target.go

ref_kind.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/ref_kind.go

remediation_check_outcome.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/remediation_check_outcome.go

remediation_commit_relevance.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/remediation_commit_relevance.go

remediation_effort.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/remediation_effort.go

remediation_status.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/remediation_status.go

remediation_validation_verdict.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/remediation_validation_verdict.go

repo_scope_path.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/repo_scope_path.go

rescan_event_source.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/rescan_event_source.go

restatement_reason.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/restatement_reason.go

restatement_target.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/restatement_target.go

revalidation_method.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/revalidation_method.go

review_item_status.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/review_item_status.go

review_reason.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/review_reason.go

review_surface.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/review_surface.go

review_surface_status.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/review_surface_status.go

risk_rating_band.goRefresh generated enum provenance +1/-1

Refresh generated enum provenance

• Updates the generated contracts commit header; enum behavior is unchanged.

go/v1/enums/risk_rating_b

[Comment truncated to fit github's 65,536-char limit.]

@qodo-for-traust-sci

qodo-for-traust-sci Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Code Review by Qodo


View medium (1)
Remediation recommended
1. SCI rejects new report sections 🔗 Cross-repo conflict
Description
The new Report.NotAffected field is accepted by this SDK, but source-code-intelligence remains
pinned to an older SDK whose embedded report schema is used by readAndVerifyResult. If a worker
uploads a report containing not_affected, SCI's results-ready path rejects it before projection;
SCI needs a coordinated SDK dependency update and a regression test for that upload.
Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
SCI validates results-ready reports using an older, closed SDK report schema, so uploads containing `not_affected` are rejected before projection.

## Fix Focus Areas
- go/v1/types/report.go[19-19]
- /cross_repos/source-code-intelligence/go.mod[17-17]
- /cross_repos/source-code-intelligence/internal/api/results_ready.go[345-354]

## Recommended Fix
Update SCI to an SDK revision containing this schema before workers emit the new section. Add an SCI results-ready regression test that uploads a report with `not_affected` and verifies it is accepted and retained.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


@qodo-code-review

qodo-code-review Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Round-trip test misses dropped reference and impact fields ✓ Resolved

Resolving commit: f638361

Resolution reason
The assertion at roundtrip_test.go was replaced with reflect.DeepEqual(back.NotAffected[0],
tc.entry), comparing every field of the entry (including reference and impact fields) after the
round-trip, and the import of reflect was added. This matches the suggested fix's recommended
DeepEqual approach, so a dropped or renamed reference/classification/evidence_level/impact_artifact
tag now fails the test.
Description
The assertion at lines 241-243 compares only len(NotAffected), Rationale and
Dependency.Advisory after decoding, although the table sets Reference (vendor case) and
Classification, EvidenceLevel, ImpactArtifact and InstalledVersion (impact-row case). A
regression that drops or renames the reference, classification, evidence_level or
impact_artifact JSON tags would still pass, and the schema check does not catch it because it only
validates shape.


Informational

2. A test comment overstates what the round-trip check proves 🐞 Bug ⚙ Maintainability ⭐ New
Description
The TestVulnFindingsAdvisoryFieldsRoundTrip comment says the cvss and dependency blocks survive a
re-encode byte-for-byte at the JSON level, but lines 343-348 decode both documents into
map[string]any and compare them with reflect.DeepEqual, so key order, number spelling (9.80 vs 9.8)
and whitespace go unchecked. The test comment also attributes these advisory fields to
traust-contracts#190, while the PR description pins #189's head 369a2ab and the generated
vuln-findings.go and report.go headers name 847e012, so the schema the validation depends on is not
identified consistently.
Code

go/v1/types/roundtrip_test.go[R251-252]

+// (traust-contracts#190) decode to exactly the values the source JSON carries,
+// survive a re-encode byte-for-byte at the JSON level, and the re-encoded
Evidence
The comment promises byte-for-byte survival, but findingMember decodes both documents into
map[string]any and compares them with reflect.DeepEqual, a semantic comparison that a later reader
relying on the test for byte-level stability would be misled by. The test comment names
traust-contracts#190 as the source of the cvss and dependency blocks, while the generated
vuln-findings.go header pins traust-contracts 847e012, which is neither #189's head 369a2ab named in
the PR description nor a revision the test names. Without a pin matching the cited PR, a reader
cannot confirm the schema the test validates against includes these members.

go/v1/types/roundtrip_test.go[251-252]
go/v1/types/roundtrip_test.go[343-348]
go/v1/types/vuln-findings.go[1-1]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The comment above TestVulnFindingsAdvisoryFieldsRoundTrip claims the cvss and dependency blocks survive a re-encode "byte-for-byte at the JSON level", but the test decodes both documents into generic values and compares them with reflect.DeepEqual. That checks only semantic equality, so key order, number spelling and whitespace are not verified. The comment also cites traust-contracts#190 as the source of these advisory fields, while the PR description pins #189's head 369a2ab and the generated headers in vuln-findings.go and report.go say 847e012. The schema validation of cvss and dependency therefore depends on a contract revision that is not identified consistently.

## Fix Focus Areas
- go/v1/types/roundtrip_test.go[251-254]
- go/v1/types/roundtrip_test.go[343-348]
- go/v1/types/vuln-findings.go[1-1]

## Recommended Fix
1. Update the comment to say the blocks decode to the source's values and re-encode with the same members and values (semantic equality). Do not weaken the assertion. If byte-level stability is wanted, add a separate check that compares canonical JSON bytes and document it as such.
2. Confirm which traust-contracts revision the regenerated code was produced from. Make the PR description, the generated header and the test comment name the same revision and PR. If the advisory fields come from #190, state that explicitly and pin a revision that contains them.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


Grey Divider

Context sources
❌ Tickets: failed to load — Ticket collection could not establish complete evidence
✅ Compliance rules (platform): 61 rules
✅ Skills: go-patterns
Review mode: Auto: 🚀 Fast: Localized tests; no production behavior or independent high-risk logic changed.

Grey Divider

Tip of the day
💡 Did you know, you can copy the agent prompt from any finding and feed it to your IDE agent

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Previous reviews

Review updated until commit 93b7503

Results up to commit 4050200 🚀 Fast


🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)


Remediation recommended
1. Round-trip test misses dropped reference and impact fields ✓ Resolved

Resolving commit: f638361

Resolution reason
The assertion at roundtrip_test.go was replaced with reflect.DeepEqual(back.NotAffected[0],
tc.entry), comparing every field of the entry (including reference and impact fields) after the
round-trip, and the import of reflect was added. This matches the suggested fix's recommended
DeepEqual approach, so a dropped or renamed reference/classification/evidence_level/impact_artifact
tag now fails the test.
Description
The assertion at lines 241-243 compares only len(NotAffected), Rationale and
Dependency.Advisory after decoding, although the table sets Reference (vendor case) and
Classification, EvidenceLevel, ImpactArtifact and InstalledVersion (impact-row case). A
regression that drops or renames the reference, classification, evidence_level or
impact_artifact JSON tags would still pass, and the schema check does not catch it because it only
validates shape.

Grey Divider

Qodo Logo

…ference with optional fields unset)

Qodo on #93: the new test departed from the table-of-cases pattern.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 4050200

…erge commit

Picks up #189's final rules (non-blank impact_artifact, reference and
rationale; govulncheck not_observed is no elimination route).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit c025da8

…s compare every field

- Regenerated against traust-contracts#190's merge: vuln-findings findings
  carry `cvss` and `dependency`.
- Qodo on #93: the not_affected round-trip compared only rationale and
  advisory, so a dropped reference or impact field would pass. It now
  compares the whole entry (reflect.DeepEqual).
- New: an advisory-backed vuln-findings finding's cvss and dependency
  round-trip field for field and re-validate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit f638361

@chubirka

Copy link
Copy Markdown
Member Author

Responses to Qodo's latest reviews, both bots:

qodo-code-review

  1. Round-trip test misses dropped reference and impact fields: fixed in f638361. The not_affected round-trip now compares the whole entry (reflect.DeepEqual), so a dropped reference or impact field fails. A new TestVulnFindingsAdvisoryFieldsRoundTrip does the same for an advisory-backed vuln-findings finding's cvss and dependency (traust-contracts#190, merged).

qodo-for-traust-sci

  1. SCI rejects new report sections: fixed in source-code-intelligence#421. SCI bumps to this SDK (f638361), and a results-ready regression test accepts a report with not_affected; that test fails on SCI's previous SDK pin.

Also in f638361: re-pinned to traust-contracts 847e012 (#190's merge). go test, go vet and make check-drift pass.

The vuln-findings round-trip test compared two Go decodes with each other,
so a field the struct dropped was missing from both and passed. Each case
now states its expected cvss and dependency values independently of the
decoder and compares the re-encoded JSON members with the source's. The
test is table-driven: every dependency field, required fields only, and a
finding with neither block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chubirka

Copy link
Copy Markdown
Member Author

Qodo follow-up for 93b7503, covering both bots:

qodo-for-traust-sci

  1. New vuln-findings round-trip test cannot add cases without a new function. Fixed. TestVulnFindingsAdvisoryFieldsRoundTrip is now table-driven. Its cases are every dependency field populated, required fields only, and a finding with no cvss/dependency.
  2. Advisory evidence loss passes the test. Fixed. Each case now states its expected cvss and dependency values independently of the decoder and checks the decode against them. It also compares the re-encoded cvss/dependency JSON members with the source document's members. Mutation check: changing impact_artifact's tag to json:"-" fails both assertions.
  3. SCI rejects new report sections. Addressed in the consumer, source-code-intelligence#421. It bumps SCI to this SDK and adds TestValidateReportBodyAcceptsNotAffected, which accepts impact-row and vendor-reference entries and refuses an entry without elimination evidence and a govulncheck not_observed entry. That test fails on the old SDK. Once this PR merges, #421 is re-pinned to the merge commit.

qodo-code-review

  1. Round-trip test misses dropped reference and impact fields. Already resolved in f638361.

go vet, go test ./... and make check-drift pass.

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 93b7503

@chubirka
chubirka merged commit 5b1bb91 into development Nov 25, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant