Skip to content

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

@second-frank

Description

@second-frank

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 frank.seidel@mercedes-benz.com, Mercedes-Benz Tech Innovation GmbH
Provider Information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions