Skip to content

Conversation

@rbailey-godaddy
Copy link
Contributor

This is another variation on the "do something if we see a surprising response" theme, but is intended to be more flexible:

  • The script uses parameters rather than hard-coded values
  • Response codes are tested against a regular expression rather than a literal value
  • A sense code is used to indicate if matching the regex is "good" or "bad", so you can either whitelist or blacklist depending on your particular use case
  • Failures (unexpected responses) generate alerts. The formatting here was tailored for mechanical consumption, but there are suggestions in the comments if you value "pretty" output

@lgtm-com

This comment has been minimized.

This is another variation on the "do something if we see a surprising
response" theme, but is intended to be more flexible:

* Response codes are tested against a regular expression rather than
  a literal value
* A sense code is used to indicate if matching the regex is "good" or
  "bad", so you can either whitelist or blacklist depending on your
  particular use case
* Failures (unexpected responses) generate alerts. The formatting here
  was tailored for mechanical consumption, but there are suggestions in
  the comments if you value "pretty" output

Signed-off-by: Scott Bailey <scott.bailey@godaddy.com>
@rbailey-godaddy rbailey-godaddy force-pushed the unexpected_responses.js branch from c11b8b4 to 2f4565c Compare August 18, 2021 14:52
@lgtm-com

This comment has been minimized.

Signed-off-by: Scott Bailey <scott.bailey@godaddy.com>
@kingthorin
Copy link
Member

Could you update https://github.com/zaproxy/community-scripts/blob/main/CHANGELOG.md with an added note in the unreleased section?

Also you seem to have committed with two different accounts, if that's something that matters to you, feel free to tweak it and force push.

Signed-off-by: Scott Bailey <scott.bailey@godaddy.com>
@rbailey-godaddy
Copy link
Contributor Author

Could you update https://github.com/zaproxy/community-scripts/blob/main/CHANGELOG.md with an added note in the unreleased section?

Done.

Also you seem to have committed with two different accounts, if that's something that matters to you, feel free to tweak it and force push.

I don't care that much -- they're both me. ;-)

Signed-off-by: Scott Bailey <scott.bailey@godaddy.com>
@thc202 thc202 merged commit 481660a into zaproxy:main Sep 7, 2021
@thc202
Copy link
Member

thc202 commented Sep 7, 2021

Thank you!

@rbailey-godaddy rbailey-godaddy deleted the unexpected_responses.js branch September 7, 2021 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants