bcgov/OCWA

Policy - Rules containing curly brace regex expressions do not work

Closed this issue · 3 comments

User Story

As a administrator of a secure analytics environment,

I want the ability to automatically scan uploaded output file for Study IDs

so that I can improve my confidence that row level data is not leaving the environment.

Test Case

ENV

DEV, TEST

TESTCASE

  • The following Python rule should be executable:
    print(not bool(re.search(r'[\\w]{1}[\\d]{9}', ${file.content}.decode('utf-8'))))

EXPECTED

  • The above rule executes and properly yields a pass or a fail

ACTUAL

  • The above rule fails for all files

@jujaga I don't know how to verify in the test environment. Failing some guidance into how I can test this, I will leave this to others to verify it's working in the test environment.

@pripley123 This should be verifiable as that the test environment contains the exact same test case rule as mentioned in this issue.

Successfully tested in the test environment