`exclude` supports `./tests` but not `tests` (with the default `.` target)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Reproduce the issue with a default target of . and exclude: tests, using a tests/ directory containing Bandit warnings. Trace the action's target and exclude handling; done means the scan omits files under tests/ while exclude: ./tests continues to work.
Written by the indexing model from the issue text.
Description
Describe the bug
It took me way too long to figure out why exclude: tests didn't work. It seems that counter-intuitively tests doesn't work to exclude directories when the default target is ., presumably because Bandit sees the directory as ./tests and doesn't recognize that tests and ./tests refer to the same directory..
To Reproduce
Steps to reproduce the behavior:
- Have a
tests/subdirectory of files with some bandit issues. - Specify
exclude: tests - Leave default target as
.
Expected behavior
Bandit action doesn't report warnings for any files under tests/
Actual behavior
Bandit scans the tests and reports warnings.
- Dominant language
- No language data
- Stars
- 32
- Forks
- 16
- Avg merge
- 2h 23m
- Merged PRs (30d)
- 4
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PyCQA/bandit-action
-
Python 3.9 is no longer in ubuntu-latestPossibly taken @zachsplat claimed this 22 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PyCQA/bandit-action#48 · 3 reactions ·
-
New tag/releaseOpenenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PyCQA/bandit-action#31 ·
-
Action dependencies not pinned to full-length commit SHAsPossibly taken @lhoupert claimed this 243 days ago. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
PyCQA/bandit-action#28 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
PyCQA/bandit-action#27 · 2 comments · 2 reactions ·
-
Bandit errors are masked as problems uploading the SARIF filePossibly taken @noqt claimed this 90 days ago. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 58/100
PyCQA/bandit-action#16 · 2 comments · 5 reactions ·
All issues in PyCQA/bandit-action
Similar issues
-
enhancement priority:low status:queued
Difficulty 1/5 Under an hour Newbie friendliness 78/100
isaaclins/freesnitch#580 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 62/100
NaturalIntelligence/fast-xml-parser#933 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
NullPointerException in PipelineStepApi.parseSteps prevents viewing stage logs when step title is nullPossibly taken @kccrcodes claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
jenkinsci/pipeline-graph-view-plugin#1587 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NimblePros/Metronome#19 ·