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

Include link to AWS Guardduty Finding Type docs in Bugzilla alert text #354

Open
ajvb opened this issue Apr 2, 2020 · 1 comment
Open
Labels

Comments

@ajvb
Copy link
Contributor

ajvb commented Apr 2, 2020

As an example, have a link to https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_stealth.html within the alert body (https://bugzilla.mozilla.org/show_bug.cgi?id=1626813#c35) since the finding type is Stealth:IAMUser/CloudTrailLoggingDisabled

@ajvb ajvb added the easy label Apr 2, 2020
@adrianosela
Copy link
Contributor

worth noting here that a naive implementation would be to just do:

if (f.getType() != null) {
    urlTemplate = "https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_%s.html";
    docsURL = String.format(urlTemplate, f.getType().toLowerCase());
    a.addMetadata(AlertMeta.Key.FINDING_DOCS, docsURL) // note FINDING_DOCS doesnt exist
}

...however the pattern above won't work for CryptoCurrency and ResourceConsumption type findings, whose docs URLs use the finding type "crypto" and "resource" respectively. (instead of "cryptocurrency" and "resourceconsumption").

checking for these two findings specifically would do it, but if they add new finding types in the future, they'll have to be addressed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants