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

Using "allowed_patterns" does not work with file paths that contain wildcards #414

Open
second-frank opened this issue Feb 22, 2023 · 0 comments · May be fixed by #418
Open

Using "allowed_patterns" does not work with file paths that contain wildcards #414

second-frank opened this issue Feb 22, 2023 · 0 comments · May be fixed by #418

Comments

@second-frank
Copy link

Describe the bug

Using allowed_patterns in the fileignoreconfig section does not work with file names/paths that contain wildcards.

To Reproduce

With .talismanrc config:

fileignoreconfig:
- filename: 'sub-folder/*.css'
  ignore_detectors: [filecontent]
- filename: 'sub-folder/*.json'
  allowed_patterns: [dataKey]

Steps to reproduce the behavior:

  1. mkdir -p sub-folder
  2. echo '@keyframes{opacity:0;transform:scale(1)}' > sub-folder/test.css
  3. echo '{"dataKey":"foobar"}' > sub-folder/test.json
  4. talisman --pattern '**/*'

Only the css file is ignored, while the json file is still reported.

Expected behavior

The filename pattern for allowed_pattern definitions should be interpreted in the same way as for ignore_detectors.

Desktop (please complete the following information):

  • OS: Ubuntu 22.04 / Windows 10 (GitBash)
  • Talisman version: 1.30.0

Frank Seidel [email protected], Mercedes-Benz Tech Innovation GmbH
Provider Information

second-frank added a commit to mercedes-benz/talisman that referenced this issue Feb 27, 2023
…ile configs (thoughtworks#414)

 - requires to change ChecksumCompare too, so it considers all ignore configs (and not only the first matching one)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant