Skip to content

CWE mapping fixes#3124

Merged
hazendaz merged 2 commits intospotbugs:masterfrom
gtoison:issue-3123
Sep 29, 2024
Merged

CWE mapping fixes#3124
hazendaz merged 2 commits intospotbugs:masterfrom
gtoison:issue-3123

Conversation

@gtoison
Copy link
Copy Markdown
Contributor

@gtoison gtoison commented Sep 26, 2024

Updated some incorrect CWE mappings reported in #3123

@davewichers
Copy link
Copy Markdown

@gtoison - Thanks for this! Looks good. However, there must be a mapping of the rule FI_NULLIFY_SUPER to CWE-586. Can we find that and either remove it or change it to match this change? I'm guessing it's in the definition/implementation of the rule?

@gtoison
Copy link
Copy Markdown
Contributor Author

gtoison commented Sep 26, 2024

FI_NULLIFY_SUPER was CWE-586 because the FI bugs were all CWE-586 by default:

<BugCode abbrev="FI" cweid="586"/>

@davewichers
Copy link
Copy Markdown

davewichers commented Sep 26, 2024

OK. Makes sense. It might make sense to review every FI rule and make sure that rule belongs in either 568, or 586, or maybe neither?? Not sure how many FI rules there are or what they each do.

UPDATE: @gtoison - I just updated the original issue to also state: "UPDATE: The rule: FI_MISSING_SUPER_CALL, which says: "Finalizer does not call superclass finalizer" should be mapped to 568 as well." Can you fix the CWE ID for that rule too?

@gtoison
Copy link
Copy Markdown
Contributor Author

gtoison commented Sep 27, 2024

Thanks, I have mapped FI_MISSING_SUPER_CALL to CWE 568.
Let me know if you find others!

@davewichers
Copy link
Copy Markdown

I have reviewed the other FI_ rules and they look fine to me. So I think you can submit this PR for merging by the spotbugs team. If I find other rules that are missing CWEid, or have them wrong, I'll create a separate issue for those, but I think this PR is good to go.

@gtoison gtoison marked this pull request as ready for review September 28, 2024 07:55
@hazendaz hazendaz added this to the SpotBugs 4.9.0 milestone Sep 29, 2024
@hazendaz hazendaz self-assigned this Sep 29, 2024
@hazendaz hazendaz merged commit 8873eb3 into spotbugs:master Sep 29, 2024
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.

3 participants