Exemple #1
0
def test_get_omitting_regexes_fallback(monkeypatch):
    expected = "(.*pass.*|.*key.*|.*secret.*|.*credential.*|SessionToken|x-amz-security-token|Signature|Authorization)"
    assert get_omitting_regex().pattern == expected
Exemple #2
0
def test_get_omitting_regexes_backward_compatibility(monkeypatch):
    monkeypatch.setenv(LUMIGO_SECRET_MASKING_REGEX_BACKWARD_COMP,
                       '[".*evilPlan.*"]')
    assert get_omitting_regex().pattern == "(.*evilPlan.*)"
Exemple #3
0
def test_get_omitting_regexes_prefer_new_environment_name(monkeypatch):
    monkeypatch.setenv(LUMIGO_SECRET_MASKING_REGEX, '[".*evilPlan.*"]')
    monkeypatch.setenv(LUMIGO_SECRET_MASKING_REGEX_BACKWARD_COMP,
                       '[".*evilPlan2.*"]')
    assert get_omitting_regex().pattern == "(.*evilPlan.*)"
Exemple #4
0
def test_get_omitting_regexes(monkeypatch):
    monkeypatch.setenv(LUMIGO_SECRET_MASKING_REGEX, '[".*evilPlan.*"]')
    assert get_omitting_regex().pattern == "(.*evilPlan.*)"