Add structured nosec directives for regions and next line
Add region and next-line nosec directives with selector expressions and ignore-nosec handling.
bandit-structured-nosec-directives
Normalized profile
What this task asks for
Add region and next-line nosec directives with selector expressions and ignore-nosec handling. Bandit can suppress findings with inline # nosec, but it cannot currently suppress a whole span of code or just the next statement without repeating inline markers. Add directives for region suppression and next-statement suppression. Each directive accepts an optional selector argument written directly after the directive keyword with no keyword prefix (e.g. # nosec-begin B602, # nosec-next-line B602). If a region begin directive appears on an indented line and is not explicitly ended, it automatically ends when a later line has smaller indentation (based on leading whitespace of the line, not the column position of the directive itself). All directive types must be ignored when Bandit is run with ignore-nosec enabled. All applicable suppressions for a finding must be combined.
Intent
- feature implementation
- configuration tuning
- data transformation
- test and validation
Work surfaces
- parser
Technology
- Bandit
Expected artifacts
- repository patch
What makes it difficult
- security-sensitive or adversarial behavior
Published evidence
Model × harness outcomes
Counts are tied to these exact configurations. Harnesses are not treated as equivalent across benchmarks.
- Models
- 13
- Configurations
- 41
- Trials
- 164
Showing 41 of 41 configurations
| Model | Harness | Effort | Result | Passes |
|---|---|---|---|---|
| claude-fable-5vertex_ai | mini-swe-agentpublished configuration | low | Mixed | 1/4 |
| claude-fable-5vertex_ai | mini-swe-agentpublished configuration | medium | No passes | 0/4 |
| claude-fable-5vertex_ai | mini-swe-agentpublished configuration | high | No passes | 0/4 |
| claude-fable-5vertex_ai | mini-swe-agentpublished configuration | xhigh | No passes | 0/4 |
| claude-fable-5vertex_ai | mini-swe-agentpublished configuration | max | No passes | 0/4 |
| claude-opus-4-8anthropic | mini-swe-agentpublished configuration | low | No passes | 0/4 |
| claude-opus-4-8anthropic | mini-swe-agentpublished configuration | medium | No passes | 0/4 |
| claude-opus-4-8anthropic | mini-swe-agentpublished configuration | high | No passes | 0/4 |
| claude-opus-4-8anthropic | mini-swe-agentpublished configuration | xhigh | No passes | 0/4 |
| claude-opus-4-8anthropic | mini-swe-agentpublished configuration | max | No passes | 0/4 |
| claude-sonnet-4-6anthropic | mini-swe-agentpublished configuration | high | No passes | 0/4 |
| claude-sonnet-5anthropic | mini-swe-agentpublished configuration | low | Mixed | 2/4 |
| claude-sonnet-5anthropic | mini-swe-agentpublished configuration | medium | No passes | 0/4 |
| claude-sonnet-5anthropic | mini-swe-agentpublished configuration | high | Mixed | 1/4 |
| claude-sonnet-5anthropic | mini-swe-agentpublished configuration | xhigh | No passes | 0/4 |
| claude-sonnet-5anthropic | mini-swe-agentpublished configuration | max | Mixed | 1/4 |
| gemini-3-1-pro-previewvertex_ai | mini-swe-agentpublished configuration | high | No passes | 0/4 |
| gemini-3-5-flashvertex_ai | mini-swe-agentpublished configuration | medium | No passes | 0/4 |
| glm-5-2zai | mini-swe-agentpublished configuration | high | Mixed | 2/4 |
| glm-5-2zai | mini-swe-agentpublished configuration | max | No passes | 0/4 |
| gpt-5-4openai | mini-swe-agentpublished configuration | xhigh | No passes | 0/4 |
| gpt-5-5openai | mini-swe-agentpublished configuration | low | No passes | 0/4 |
| gpt-5-5openai | mini-swe-agentpublished configuration | medium | No passes | 0/4 |
| gpt-5-5openai | mini-swe-agentpublished configuration | high | No passes | 0/4 |
| gpt-5-5openai | mini-swe-agentpublished configuration | xhigh | No passes | 0/4 |
| gpt-5-6-lunaopenai | mini-swe-agentpublished configuration | low | No passes | 0/4 |
| gpt-5-6-lunaopenai | mini-swe-agentpublished configuration | medium | No passes | 0/4 |
| gpt-5-6-lunaopenai | mini-swe-agentpublished configuration | high | No passes | 0/4 |
| gpt-5-6-lunaopenai | mini-swe-agentpublished configuration | xhigh | No passes | 0/4 |
| gpt-5-6-lunaopenai | mini-swe-agentpublished configuration | max | No passes | 0/4 |
| gpt-5-6-solopenai | mini-swe-agentpublished configuration | low | No passes | 0/4 |
| gpt-5-6-solopenai | mini-swe-agentpublished configuration | medium | No passes | 0/4 |
| gpt-5-6-solopenai | mini-swe-agentpublished configuration | high | No passes | 0/4 |
| gpt-5-6-solopenai | mini-swe-agentpublished configuration | xhigh | No passes | 0/4 |
| gpt-5-6-solopenai | mini-swe-agentpublished configuration | max | No passes | 0/4 |
| gpt-5-6-terraopenai | mini-swe-agentpublished configuration | low | Mixed | 1/4 |
| gpt-5-6-terraopenai | mini-swe-agentpublished configuration | medium | No passes | 0/4 |
| gpt-5-6-terraopenai | mini-swe-agentpublished configuration | high | No passes | 0/4 |
| gpt-5-6-terraopenai | mini-swe-agentpublished configuration | xhigh | No passes | 0/4 |
| gpt-5-6-terraopenai | mini-swe-agentpublished configuration | max | No passes | 0/4 |
| kimi-k2-7-codeopenrouter | mini-swe-agentpublished configuration | default | No passes | 0/4 |