Update validation for report_vuln#21421
Conversation
|
Idea: What if it would just default to "name" variable, if its not defined? That way, whatever module called it, its used? |
6ec123b to
9435bee
Compare
|
Hm. It looks like there was only one module impacted by this in the codebase, which you've fixed now - so I think it's okay tightening things up here, but let me know your thoughts 🤔 There's the potential that external third party/private modules would be impacted by this change, but I guess there's no change in end user behavior there |
|
Not sure if asking me, or others with more exp ;) My 2 cents is that it makes sense that the module name matches the vuln, and I would rather it be one less thing to think about (and everything matches/lines up) - so I'm all for using defaults (and able to overwrite it if needed/wanted) - keep things consistent. |
|
If we had more modules with this issue, I'd be tempted to have a fallback - but I think we should be good. If any user issues pop up, we can go with the defaults approach. I'm hoping since this always crashed previously, and now there's just a better error message, there shouldn't be any impact 🤞 |
|
For what its worth, a very rough grep search, 69 modules use $ grep -R 'name: name' -B5 | grep 'report_vuln\|name:' | grep report_vuln | wc -l
69
$ |
|
Thanks for taking a look! 💯 |
Release NotesThis adds extra validation to |
Continuation of #21314
Verification
Before
When
report_vulnis called without anameoption:After
Now: