Skip to content

Conversation

adamrdavid
Copy link
Contributor

@adamrdavid adamrdavid commented Jan 10, 2020

Issue:

Handles the source code warrior mapping in a more dynamic way and puts it in artifacts. Eventually I think we will want the artifact generation to actually commit to a directory in the repo, but for now they are just in the actions tab.

Previous solution was a static mapping: #264

CVSS v3 Mapping:

CWE Mapping:

Remediation Advice Mapping:

Deprecated Node Mapping (if needed):

Checklist:

  • I have added entries to CHANGELOG.md and marked it Added/Changed/Removed
  • I have made corresponding changes to the documentation (if needed)

To come:

At some point we would like to include an additional_resources directory where this map will live with some markdown about how to use it. This action will then be updated to confirm that the generated artifact matches the one committed to that directory.

@adamrdavid adamrdavid added the development Relating to the development environment (no taxonomy change) label Jan 10, 2020
@adamrdavid adamrdavid force-pushed the generate-artifacts-workflow branch from b35fa1e to cc44bda Compare January 10, 2020 19:28
README.md Outdated
- [Remediation Advice](mappings/remediation_advice/remediation_advice.json)

#### Remediation Training
- [Source Code Warriors](https://github.com/bugcrowd/vulnerability-rating-taxonomy/commit/ff2999c74ac4f10a6346edd2becfc78a730a09ae/checks?check_suite_id=361261433)

Choose a reason for hiding this comment

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

This is referencing the artifact via the commit hash. Will this link need to be updated for every build ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for now yes, but only on a new release. before we get to that I want to build a little meta page that gets generated and committed with the artifact, so the link will be removed from this page.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated this to just point to the main tab temporarily and mention that it is a temporary holding place before we make the meta page.

@@ -0,0 +1,40 @@
import json
import requests
import tests.utils

Choose a reason for hiding this comment

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

Now some of these test utils are used to build an artifacts, would it make sense to move them to out from tests ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes! thoughts on a good place to put them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe a new dir called utils or maybe all code (non json taxonomy/schema stuff) should go under lib

Choose a reason for hiding this comment

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

Unsure of what the convention is with python but utils sounds like a good name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated file locations. I put everything under lib so it doesn't look so messy and segregates the main taxonomy/schema from dev concerns.

@adamrdavid adamrdavid force-pushed the generate-artifacts-workflow branch from b965ac1 to 577aa81 Compare February 20, 2020 23:24
on:
push:
branches:
- master
Copy link
Contributor

Choose a reason for hiding this comment

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

should it be PR's as well to test how it it outputs prior to the merge?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

due to the noisy nature of the command making a bunch of requests to check if they 404 we want to limit it as much as possible, but can adjust moving forward.

Essentially the current setup is to generate every time on a merge to master, or direct push to master, and releases. The other PR: #278 would instead make this a check whether or not it is up to date and require updating.

barnett and others added 6 commits December 15, 2020 12:33
* Test validating document

* Test with file existing, but incorrect

* Test with correct json

* Adjust event filtering for validation workflow

Does this make sense?  Ideally we don't run this often,
but we want to make sure the links are up to date for each
release.

* Add readme for remediation

* Fix link

* delete readme specific mapping for now

Co-authored-by: Barnett Klane <[email protected]>
Copy link
Contributor

@barnett barnett left a comment

Choose a reason for hiding this comment

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

Tested, fixed and works. Let's :shipit:

@adamrdavid adamrdavid merged commit 7e8a8f6 into master Dec 17, 2020
@adamrdavid adamrdavid deleted the generate-artifacts-workflow branch December 17, 2020 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

development Relating to the development environment (no taxonomy change)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants