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

Add deprecated node mapping and info/example to readme #31

Merged
merged 13 commits into from
Jun 22, 2017

Conversation

adamrdavid
Copy link
Contributor

closes this issue: #24

README.md Outdated
@@ -81,6 +81,36 @@ Entries that are nested within another Entry. Only Categories or Sub-Categories
}
```

### Deprecated node mapping
When breaking changes such as deletion/collapsing of IDs or moving to a different category occur, the `deprecated_node_mapping` will serve as a reference to find the latest ids for deprecated nodes.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we replace category with parent since the subcategory can change as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thoughts on adding mapped like so: to find the latest mapped ids?

README.md Outdated
### Deprecated node mapping
When breaking changes such as deletion/collapsing of IDs or moving to a different category occur, the `deprecated_node_mapping` will serve as a reference to find the latest ids for deprecated nodes.

**Any time such a breaking change occurs, it requires a new entry to be added to the deprecated_node_mapping**
Copy link
Contributor

Choose a reason for hiding this comment

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

can we use hyphens for the name so it matches the file name:
deprecated-node-mapping.json

README.md Outdated
"2.1": "unvalidated_redirects_and_forwards.open_redirect.get_based"
},
"unvalidated_redirects_and_forwards.open_redirect.get_based_unauthenticated": {
"2.1": "unvalidated_redirects_and_forwards.open_redirect.get_based"
Copy link
Contributor

Choose a reason for hiding this comment

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

we can probably just use a single example for brevity

Copy link
Contributor Author

@adamrdavid adamrdavid Jun 8, 2017

Choose a reason for hiding this comment

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

up to you, but I think the full example helps describe how multiple nodes are being collapsed into one.

@adamrdavid adamrdavid requested a review from barnett June 8, 2017 18:54
barnett
barnett previously approved these changes Jun 8, 2017
#### Example
_2 nodes being collapsed into 1_
```json
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe move this concrete example into contributing as well?

Copy link
Contributor

@barnett barnett Jun 8, 2017

Choose a reason for hiding this comment

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

In CONTRIBUTING.md we only have examples with formats so far. I think that's fine, unless we want to add concrete examples for both.

@plr0man plr0man added this to the v1.2 milestone Jun 10, 2017
@plr0man
Copy link
Contributor

plr0man commented Jun 13, 2017

What do you guys want to do when we expand one entry into two like in #34?
sensitive_data_exposure.token_leakage_via_referer.over_https is replaced with:
sensitive_data_exposure.token_leakage_via_referer.trusted_3rd_party
sensitive_data_exposure.token_leakage_via_referer.untrusted_3rd_party

@barnett
Copy link
Contributor

barnett commented Jun 13, 2017

@plr0man I am not sure we create a mapping if the previous node gains specificity. While that will create multiple nodes names that partially overlap in an aggregate, I think that is ok.

@adamrdavid
Copy link
Contributor Author

@barnett before you merge this I would like to write a little validator script that basically checks that the mapped nodes exist in the specified versions.

  Example error output:
    Errors: [{'missing_node': u'unvalidated_redirects_and_forwards.open_redirect.get_basedd', 'version': u'1.2'}]
@adamrdavid adamrdavid dismissed barnett’s stale review June 22, 2017 00:53

made changes afterwards, would like another review, specifically around the validator

@maschwenk
Copy link
Contributor

Make sure to exit with Unix exit code so that Docker understands what's going on

Copy link
Contributor

@maschwenk maschwenk left a comment

Choose a reason for hiding this comment

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

🚢 other than my small note

@maschwenk
Copy link
Contributor

Maybe grab @danielhtrauner 's eyes on that 🌶 🌶 🐍 code

@dantrauner
Copy link

Probably better to use an actual git Python module than calls to subprocess.Popen() (I see there's GitPython with quite a few stars, but I haven't used it). And even if you do use that, do you really need shell=True?

@adamrdavid
Copy link
Contributor Author

@danielhtrauner good idea will do ;)

@barnett barnett merged commit 2b1854e into master Jun 22, 2017
@barnett barnett deleted the add-deprecated-node-mapping branch June 22, 2017 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

5 participants