-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ThreatModels: Add stdin
kind
#17209
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
ThreatModels: Add stdin
kind
#17209
Conversation
I don't think this warrants a change-note, but let me know if you think otherwise 👍 |
Click to show differences in coveragecsharpGenerated file changes for csharp
- package,sink,source,summary,sink:code-injection,sink:encryption-decryptor,sink:encryption-encryptor,sink:encryption-keyprop,sink:encryption-symmetrickey,sink:file-content-store,sink:html-injection,sink:js-injection,sink:log-injection,sink:sql-injection,source:commandargs,source:database,source:environment,source:file,source:file-write,source:local,source:remote,source:windows-registry,summary:taint,summary:value
+ package,sink,source,summary,sink:code-injection,sink:encryption-decryptor,sink:encryption-encryptor,sink:encryption-keyprop,sink:encryption-symmetrickey,sink:file-content-store,sink:html-injection,sink:js-injection,sink:log-injection,sink:sql-injection,source:commandargs,source:database,source:environment,source:file,source:file-write,source:remote,source:stdin,source:windows-registry,summary:taint,summary:value
- Amazon.Lambda.APIGatewayEvents,,6,,,,,,,,,,,,,,,,,,6,,,
+ Amazon.Lambda.APIGatewayEvents,,6,,,,,,,,,,,,,,,,,6,,,,
- System,54,47,10626,,6,5,5,,,4,1,,33,2,,6,15,17,3,4,,8721,1905
+ System,54,47,10626,,6,5,5,,,4,1,,33,2,,6,15,17,4,3,,8721,1905 |
Thank you @RasmusWL ! Just to be on the safe side, I think we should add a change note. At least for Java we are "moving" |
@@ -15,6 +15,7 @@ extensions: | |||
- ["database", "local"] | |||
- ["commandargs", "local"] | |||
- ["environment", "local"] | |||
- ["stdin", "local"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I think this is a good decision.
But I'm debating whether it makes more sense as a completely separate threat model kind versus a sub-kind of file
(my understanding of how threatModelEnabled
works is that it supports sub-kinds).
Either way I agree with @michaelnebel that this should have a change note.
I agree it would be good to have a change note so that users who read the change notes are aware of the new threat model kind. You can probably copy some of the test from this change note from a PR where I added a new kind (but in a slightly different context, where I was removing some sources from the default and letting users know how to turn them back on). I find @egregius313 's suggestion of making it a sub-model of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also update the documentation listing different threat model kinds here.
Had to force push after #17208 was merged, so disregard this. |
None of the current local subgroups precisely captures stdin, so although it's much like both commandargs and file, a separate kind seems better.
c81b270
to
78770bc
Compare
I think the reason you are seeing a "shift" in the MaD IDs is because they are based directly on the |
Ah yes, that explains the difference 👍 I've rebased the PR 👍 |
@RasmusWL : Excellent! Thank you! |
The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
As discussed internally, none of the current local subgroups precisely captures stdin, so although it's much like both commandargs and file, a separate kind seems better.
I've ported the obvious models from C# and Java.