Skip to content

Remove deprecated keyExpectedValue, keyActualValue and issueType fields#232

Merged
whitemerch merged 2 commits into
mainfrom
chakib.hamie/remove_deprecated_result_fields
Jul 2, 2026
Merged

Remove deprecated keyExpectedValue, keyActualValue and issueType fields#232
whitemerch merged 2 commits into
mainfrom
chakib.hamie/remove_deprecated_result_fields

Conversation

@whitemerch

@whitemerch whitemerch commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Motivation

The keyExpectedValue, keyActualValue, and issueType fields were presentation-only outputs that rules used to populate. We don't even use them on the SARIF output anymore. Default rules no longer emit them (see datadog-iac-scanner-default-rules#72), and they are not part of the finding identity contract. Keeping code that reads them from rule results produces noisy warn-level log entries every time a finding is produced, at high volume in production scans. This is a follow-up for this PR

Changes

Engine

Remove reads of keyExpectedValue, keyActualValue, and issueType from vulnerability_builder.go. Remove the DefaultIssueType constant from inspector.go.

Model

Remove the IssueType type, its constants, AllIssueTypesAsString, and the IssueType, KeyExpectedValue, and KeyActualValue fields from both Vulnerability and VulnerableFile.

Report formats

Remove issueType, expected_value, and actual_value columns from CSV output. Remove the "Expected value / Actual value" text from ASFF, JUnit, CycloneDX, and HTML report messages and templates.

Rule validation

Remove the allowedIssueTypes check from the rule test command — issueType is no longer a recognised result field.

Author Checklist

  • I have reviewed my own PR.
  • I have added or updated relevant unit tests where necessary. If no tests are added, I've explained why.
  • All new and existing tests pass.
  • I have tested my changes on staging (if applicable).
  • I have updated any relevant documentation (if applicable).

QA Instruction

go test ./pkg/engine/ ./pkg/model/... ./pkg/report/... ./cmd/...

Scan any IaC fixture and confirm no Failed to get key keyExpectedValue in map / keyActualValue / issueType warnings appear in the scan log.

Blast Radius

This PR only affects the scanner binary and its report outputs.

Additional Notes

Companion PR removing the fields from rule outputs: datadog-iac-scanner-default-rules#72

I submit this contribution under the Apache-2.0 license.

@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Jul 2, 2026

Copy link
Copy Markdown

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 50.47% (-0.11%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 048e8ed | Docs | Datadog PR Page | Give us feedback!

@whitemerch
whitemerch force-pushed the chakib.hamie/remove_deprecated_result_fields branch 2 times, most recently from 7013e77 to 4ae4044 Compare July 2, 2026 10:57
@whitemerch
whitemerch marked this pull request as ready for review July 2, 2026 10:58
@whitemerch
whitemerch requested a review from a team as a code owner July 2, 2026 10:58
…e scanner model, engine, and all report formats.
@whitemerch
whitemerch force-pushed the chakib.hamie/remove_deprecated_result_fields branch from 4ae4044 to ad7bc15 Compare July 2, 2026 11:01
ChouraquiBen
ChouraquiBen previously approved these changes Jul 2, 2026

@ChouraquiBen ChouraquiBen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the goal is to remove them completely, please know there are still some occurences:

  • keyExpectedValue: 10 results in 5 files
  • keyActualValue: 10 results in 5 files
  • issueType: 24 results in 6 files

Otherwise, LGTM

@whitemerch

Copy link
Copy Markdown
Contributor Author

If the goal is to remove them completely, please know there are still some occurences:

  • keyExpectedValue: 10 results in 5 files
  • keyActualValue: 10 results in 5 files
  • issueType: 24 results in 6 files

Otherwise, LGTM

@ChouraquiBen Yes it is, it's just that I am confusing my worktrees and directories between each other and I am oversighting some of the stuff. Will fix

@ChouraquiBen ChouraquiBen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@whitemerch
whitemerch merged commit 4fb4285 into main Jul 2, 2026
20 checks passed
@whitemerch
whitemerch deleted the chakib.hamie/remove_deprecated_result_fields branch July 2, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants