DF Li_python_sec_check
Python 安全规范检查工具 - 基于 CloudBase 规范 + 腾讯安全指南 + LLM 智能分析(LLM 功能默认禁用,本地执行优先)
As a process F 34/100 · Will not run — weak spots: steps, result and completion, when it triggers
What is at stake
Medium-severity findings: the skill is probably honest, but read what alarmed the scanner.
Below is the worst case for this category. The finding here is medium: the guard saw a sign, not a proof.
The instructions or scripts send data out: environment variables, keys, file contents, chat history. You may never notice, because the agent performs the upload as "part of the task".
If the upload is not needed for the task, remove it: catalogs flag such skills and delist them. If it is needed, name the destination explicitly, say what leaves the machine, and give the user a switch.
Below is the worst case for this category. The finding here is medium: the guard saw a sign, not a proof.
The skill contains commands that delete files, rewrite disks or execute code fetched from the network. The agent may run them without asking if it believes the instructions require it.
Replace destructive commands with safe equivalents that ask for confirmation, scope them to one folder, and stop piping curl into a shell: pin a version and a checksum.
How to improve
- Say in the description WHEN to use the skill ("use when…", example requests): that is the agent's main cue.
- For Hermes the description must be one sentence under 60 characters; move the conditions to a "When to Use" section.
- Your own cases (evals/evals.json, 4–6 real requests with expected answers): the full check would then run those instead of a model-drafted suite.
- A spec.yaml with trigger phrases and assertions — a behaviour contract for CI; `skilltest init` writes a template.
Guard findings · 6
✓ No critical or high findings
Medium and low: 6
-
medium Exfiltration
net-redirectable-api-keyscripts/llm_analyzer.py:29Helper sends the API key to a host configured by an environment variable — the key can be redirected to another serverAPI key + configurable base URL from environment
-
medium Dangerous commands
cmd-eval-dynamictest-reports-v21/bandit-report.html:200Dynamic code execution from decoded/untrusted input30 os.system("ping -c 1 " + host)
-
medium Dangerous commands
cmd-eval-dynamictest-reports/bandit-report.html:200Dynamic code execution from decoded/untrusted input30 os.system("ping -c 1 " + host)
-
low Exfiltration
read-dotenvdocs/目录扫描功能验证.md:314Reads a .env filecp .env.example .env
-
low Secrets in code
secret-password-literalexamples/unsafe-example/app.py:13Hard-coded password / key literal (may be an example) (placeholder value)API_KEY = "sk-1…def"
placeholder -
low Dangerous commands
cmd-eval-dynamicexamples/unsafe-example/app.py:30Dynamic code execution from decoded/untrusted input (test fixture / example file)os.system("ping -c 1 " + host)fixture
Files scanned: 27. Evidence is masked. Grey chips explain why severity was lowered.
Against the Agent Skills spec
- error
body-emptySKILL.md: empty instructions body - warning
name-formatname should be kebab-case (lowercase letters, digits, hyphens) - warning
description-long-hermesdescription is 72 chars; the Hermes authoring standard requires ≤ 60 (one sentence, ending with a period) - warning
description-no-whenneither description nor a "## When to Use" section says when to use the skill
Process rating: all ten parameters 34/100
- 0Steps. Prose only: no discrete steps
- 0Result and completion. Does not say what the result is
- 0Inputs and preconditions. Does not say what the process needs to start
- 0Failures and branches. Linear process with no failure handling
- 0Progress reporting. Says nothing while it works
- 20When it triggers. No condition that starts the skill
- 40Consistency. Frontmatter name (Li_python_sec_check) differs from the folder (li-python-sec-check)
- 100Tools and files. No external tools needed
- 100Execution cost. Instruction body is 0 tokens
- 100Running it twice. No mutating operations
Everything here is measured from the skill text rather than judged by a model, so the numbers are checkable. A parameter weighs more when it is a more common reason for the process to stall.
Quality signals
- +5Description has no quoted example phrases that should trigger the skill
- +4Description does not say when NOT to use the skill (false activations)
- +3Description length 72: 120–800 characters recommended
- +4Structure: 0 headings, hard to scan
- +3No numbered steps or checklist
- +3Output format is not stated: the model decides each time
- +4No input/output examples
- -15SKILL.md body under 300 characters: nearly empty
- -47 reference files, but SKILL.md never points to them: the model will not open them
- -32 of 2 scripts are never mentioned in SKILL.md
- +2Single-language instructions
- +1License stated
Quality base 70; lint remarks subtract, signals add up to 100. Result: 0.