Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow overriding Finding attrs #137

Merged
merged 2 commits into from
Dec 28, 2020
Merged

allow overriding Finding attrs #137

merged 2 commits into from
Dec 28, 2020

Conversation

nineinchnick
Copy link
Collaborator

Allow overriding Finding attributes in particular data flows (or other assets). For example, this allows to set custom responses, CVSS scores (added as new attrs) or increase/lower the severity. See the new test for usage examples.

If there's an override defined for a particular threat, it'll always be added as a finding, even if the threat no longer applies. This is to include all mitigations in a report. To remove the finding, remove the override.

Overrides are defined per element because otherwise the original threat should be adjusted.

Overrides can be defined in an asset and then they'd apply to all dataflows. For more granularity, they should be defined only in particular dataflows. There's a check to avoid having two overrides for the same threat, since it would be hard to debug why an override doesn't get applied when it would be overwritten by another one.

@ghost
Copy link

ghost commented Dec 13, 2020

DeepCode's analysis on #64ebf2 found:

  • ℹ️ 1 minor issue. 👇

Top issues

Description Example fixes
Access to a protected member _threats of a client class Occurrences: 🔧 Example fixes

👉 View analysis in DeepCode’s Dashboard | Configure the bot

@izar
Copy link
Owner

izar commented Dec 24, 2020

How about adding an example on readme ?

@nineinchnick
Copy link
Collaborator Author

How about adding an example on readme ?

Great idea, done! I also added a bit more info in the usage section.

@izar
Copy link
Owner

izar commented Dec 28, 2020

Good stuff!

@izar izar merged commit 18f0db7 into izar:master Dec 28, 2020
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.

None yet

2 participants