Skip to content

Conversation

@jjnicola
Copy link
Member

What:
Fix: scannerctl scan-config translator
SC-1498

Why:
scannerctl crashes when there is no preferences in the src XML scan config

How:

Checklist:

  • Tests
  • PR merge commit message adjusted

scannerctl crashes when there is no preferences in the src XML scan config
@jjnicola jjnicola requested a review from a team as a code owner November 11, 2025 17:17
@github-actions
Copy link

github-actions bot commented Nov 11, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 828753e.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Files

None

@github-actions github-actions bot added the patch_release creates a patch release label Nov 11, 2025
#[derive(Clone, Debug, Deserialize, PartialEq)]
struct ScanConfigPreferences {
preference: Vec<ScanConfigPreference>,
preference: Option<Vec<ScanConfigPreference>>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a good reason we couldn't do

    #[serde(default)]
    preference: Vec<ScanConfigPreference>,

instead? This would default to an empty vec which sounds better to me than using an option

@github-actions github-actions bot added patch_release creates a patch release and removed patch_release creates a patch release labels Nov 13, 2025
@jjnicola jjnicola force-pushed the scannerctl-scanconfig branch from ca116ce to 828753e Compare November 13, 2025 11:26
@github-actions github-actions bot added patch_release creates a patch release and removed patch_release creates a patch release labels Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch_release creates a patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants