NVIDIA / NVIDIA/SkillSpector

shell=True detection can be bypassed through variable assignment (malicious skill example that bypasses this static detection model)

Open
#475 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
17.9k
Forks
1.5k
Avg merge
5d 10h
Merged PRs (30d)
66

Description

Summary

The scanner's Tool Misuse detection can be bypassed by assigning the shell argument to a variable instead of using shell=True directly.

Original:

command = f'python a.py'
result = subprocess.run(
    command,
    shell=True,
    capture_output=True,
    text=True
)

Result:

Risk score: 76
Severity: HIGH
Recommendation: DO_NOT_INSTALL
TM1: Tool Parameter Abuse detected

Variant:

command = f'python a.py'
a = True
result = subprocess.run(
    command,
    shell=a,
    capture_output=True,
    text=True
)

Result:

Risk score: 46
Severity: MEDIUM
Recommendation: CAUTION
TM1 finding is missing

Expected Behavior

Both variants should receive equivalent findings because a statically resolves to True.

Impact

A simple variable assignment removes the TM1 high-severity finding and significantly reduces the overall risk score, which may affect installation recommendations.

Suggested Fix

Add constant propagation / variable resolution for sensitive parameters such as shell, so values that statically resolve to True are treated the same as direct shell=True.

Reproduction results

Here are the comparative JSON results provided

adv.json
ori.json

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Tool Misuse detection logic that handles subprocess shell arguments, then compare the direct shell=True case with the variable-assignment variant using the linked adv.json and ori.json results. Trace how statically assigned values are resolved. Done means both examples receive equivalent TM1 findings and risk recommendations, with regression coverage added if the project’s test structure identifies a suitable location.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.