-
-
Notifications
You must be signed in to change notification settings - Fork 249
Add Swagger Secret & Version Detector active scan rule #487
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
base: main
Are you sure you want to change the base?
Add Swagger Secret & Version Detector active scan rule #487
Conversation
Great job! No new security vulnerabilities introduced in this pull request |
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.
This is just a quick look
Thanks @kingthorin I will update my script based on your comments |
@kingthorin I have made the suggested changes here: 97215e6 |
97215e6
to
4d7e813
Compare
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.
Within the two main for loops it should probably check isStop()
and exit. (If the user has hit stop on the scan before the rule is complete).
Re the build failure:
|
4d7e813
to
117d413
Compare
Signed-off-by: Aastha Sahni <[email protected]>
70e0b0f
to
920664d
Compare
@kingthorin this is done as well. |
…hich includes recent comments. Signed-off-by: Aastha Sahni <[email protected]>
Signed-off-by: Aastha Sahni <[email protected]>
8281d5c
to
0de188d
Compare
Signed-off-by: Aastha Sahni <[email protected]>
bc4d4dc
to
24d9f9e
Compare
@kingthorin Apologies for not cleaning up the comments, it is done now. |
…nd remove extra space from file name. Signed-off-by: Aastha Sahni <[email protected]>
db84d56
to
e8cebcf
Compare
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.
Sorry I didn't check/think of this earlier. File name should use CamelCase.ext
https://github.com/zaproxy/community-scripts/blob/main/CONTRIBUTING.md#naming-scripts
There are existing scripts that are non-conformant, we need to do a renaming pass and also figure out the plan for updating the add-on. But new stuff should conform to make life easier for everyone.
Edit: I guess it's actually Pascal Case
🤷♂️
https://www.freecodecamp.org/news/snake-case-vs-camel-case-vs-pascal-case-vs-kebab-case-whats-the-difference/
Signed-off-by: Aastha Sahni <[email protected]>
@kingthorin the script has been renamed with pascal case. |
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.
One file should be removed.
The CHANGELOG should be updated as well. (Model based on existing entries)
@kingthorin Thanks for the catch, I did remove the file but don't know why it did not go in the commit. for Change log - what else needs to be updated in addition to the active script entry? Update: made the changes, please review. |
Signed-off-by: Aastha Sahni <[email protected]>
That's it, just a note that it was added. The file should be straight forward. The addition just goes in the unreleased section/heading. |
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 good to me
🧪 New Active Scan Script: Swagger Secret & Version Detector
✅ Summary
This script detects:
clientSecret
,access_token
,api_key
,authorization
⚙️ Technical Details
getMetadata()
for integration into ZAP scan rules100001-1
: Vulnerable Swagger UI version100001-2
: Exposed secrets🧪 Tested Against
📚 References
Author: @aasthasahni9
Script file:
active/swagger-secret-detector.js