Skip to content

fix(whitelist): Whitelist logic reformulated again#1061

Merged
jfagoagas merged 2 commits intomasterfrom
PRWLR-238-whitelisting-doesnt-match-example-in-whitelist-sample-txt
Mar 11, 2022
Merged

fix(whitelist): Whitelist logic reformulated again#1061
jfagoagas merged 2 commits intomasterfrom
PRWLR-238-whitelisting-doesnt-match-example-in-whitelist-sample-txt

Conversation

@n4ch04
Copy link
Contributor

@n4ch04 n4ch04 commented Mar 8, 2022

Context

Current whitelisting logic did not detect whitelisted element if includes POSIX character classes

Description

Reformulate whitelisting logic to detect POSIX character classes into whitelisted element

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

if [[ "${checked_value}" == *"${resource_value}"* ]]; then
# To set WARNING flag checked_value have to include value of resource_value
# If it is treated as only expanse (*[]*) will not detect regex like [:alpha:]
if [[ "${checked_value}" =~ ${resource_value} ]]; then
Copy link

Choose a reason for hiding this comment

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

This look good! Thanks for sorting it out :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're welcome !!

ghost
ghost previously approved these changes Mar 8, 2022
@n4ch04 n4ch04 dismissed ghost ’s stale review via 2f664e0 March 8, 2022 14:53
Copy link
Contributor

@MrCloudSec MrCloudSec left a comment

Choose a reason for hiding this comment

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

Thank you @wobblesprout

Copy link
Member

@jfagoagas jfagoagas left a comment

Choose a reason for hiding this comment

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

Good job @n4ch04

🔝

@jfagoagas jfagoagas merged commit f04b174 into master Mar 11, 2022
@jfagoagas jfagoagas deleted the PRWLR-238-whitelisting-doesnt-match-example-in-whitelist-sample-txt branch March 11, 2022 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants