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

Regex modifications #13

Open
3 tasks
karikarshivani opened this issue Dec 28, 2022 · 0 comments
Open
3 tasks

Regex modifications #13

karikarshivani opened this issue Dec 28, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@karikarshivani
Copy link
Contributor

karikarshivani commented Dec 28, 2022

Instance of a regex error that we see:

expected "/var/lib/pgsql/12/data/log/postgresql-Wed.log:<2022-12-28 03:51:28.529 UTC psql postgres postgres [local] 6929>ERROR:  permission denied to set parameter \"pgaudit.role\"\n"

to match /^.*permission denied to set parameter ..pgaudit.role..*$/

Diff:
@@ -1,2 +1,2 @@

-/^.*permission denied to set parameter ..pgaudit.role..*$/
+/var/lib/pgsql/12/data/log/postgresql-Wed.log:<2022-12-28 03:51:28.529 UTC psql postgres postgres [local] 6929>ERROR:  permission denied to set parameter "pgaudit.role"

The regex in the code seems to be accounting for escape characters so the .. in ..pgaudit.role caused it to not match when it should have.


List of controls that need to be reviewed for regex:

  • V-233544
  • V-233547
  • V-233553 (\"\" should be replaced with .*)
@karikarshivani karikarshivani added the bug Something isn't working label Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant