Back to skill

Security audit

Go安全质量检查免费版

Security checks for vulnerabilities and agentic risk

Overview

This Go security skill is mostly purpose-aligned, but some workflows can change project dependencies and install mutable tooling without clear confirmation or rollback controls.

Install only if you are comfortable with an agent running Go commands in your repository. Treat scanning as read-only unless you explicitly approve dependency changes, prefer pinning govulncheck to a reviewed version, run update examples on a clean branch, and inspect go.mod/go.sum diffs before accepting changes.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:51
Finding

Unpinned Installation of an Executable Third-Party Dependency

Content
View full analysis
/dev/null; then echo "安装govulncheck..." go install golang.org/x/vuln/cmd/govulncheck@latest fi ``` The same mutable installation pattern is used in the documented CI workflow: ```yaml - name: Install govulncheck run: go install golang.org/x/vuln/cmd/govulncheck@latest ``` ### Technical Analysis The Skill instructs the agent to download, compile, and execute the mutable `latest` version of `golang.org/x/vuln/cmd/govulncheck`. Although this is the official module path and there is no evidence of malicious intent, the version ultimately executed can change without any corresponding modification to the audited Skill. This prevents reproducible execution and creates supply-chain exposure. A compromised upstream release, module distribution service, proxy, or newly published version could cause code that was not reviewed during this audit to run automatically. Because `go install` compiles and installs an executable, the resulting program subsequently runs with the same operating-system permissions as the agent or CI worker. ### Attack Path 1. An attacker compromises an upstream release channel, module source, or configured Go module proxy, or otherwise causes a malicious future release to resolve as `latest`. 2. A user invokes the Skill on a system where `govulncheck` is not already available, or the documented CI workflow runs. 3. The command resolves and installs the attacker-controlled version. 4. The installed executable is invoked against the project. 5. Malicious code executes with the permissions and accessible environment of the agent or CI worker. This path depends on compromise or manipulation of the external dependency-delivery chain; the ...[truncated 682 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:74
Finding

Unsafe Predictable File in a Shared Temporary Directory

Content
View full analysis
/tmp/vuln-results.json 2>/dev/null # 解析漏洞信息 echo "" echo "--- 漏洞列表 ---" jq -r '.osv // empty | "漏洞ID: \(.id)\n 描述: \(.summary // .details[:100] // "无描述")\n 严重性: \(.database_specific.severity // "未知")\n"' /tmp/vuln-results.json 2>/dev/null echo "" echo "--- 受影响模块 ---" jq -r '.finding // empty | "模块: \(.trace[0].module)\n 版本: \(.trace[0].version)\n 漏洞: \(.osv)\n 是否调用: \(.trace[1].function // "未直接调用")\n"' /tmp/vuln-results.json 2>/dev/null echo "" echo "--- 统计 ---" TOTAL=$(jq -s '[.[] | select(.osv)] | length' /tmp/vuln-results.json 2>/dev/null || echo "0") CALLED=$(jq -s '[.[] | select(.finding and .finding.trace[1])] | length' /tmp/vuln-results.json 2>/dev/null || echo "0") ``` ### Technical Analysis The workflow stores scan results at the fixed path `/tmp/vuln-results.json`. Shared temporary directories are generally writable by multiple local users. The script does not: - Create the file atomically - Check whether the path already exists - Reject symbolic links - Verify file ownership - Set restrictive permissions explicitly - Use a per-process unique name - Remove the file after processing Shell output redirection follows symbolic links. On a system where an attacker can prepare the path before the scan starts, the redirection may overwrite another file writable by the scanning account. Concurrent executions can also overwrite or consume one another's output. The generated JSON may disclose project module names, versions, vulnerable functions, and dependency details to other local users if default permissions permit access. ### Attack Path 1. A local attacker with write access to `/tmp` predicts the fixed filename. 2. Before the Skill runs, the attacker creates `/tmp/vuln-results.json` as a symb ...[truncated 1119 chars]
Remediation
View remediation
"$VULN_RESULTS"; then echo "govulncheck failed" >&2 exit 1 fi jq -r '...' "$VULN_RESULTS" ``` Additional hardening measures: 1. Never construct a temporary filename using only a fixed name or process ID. 2. Quote every reference to the generated path. 3. Do not suppress scan or parser failures without reporting them. 4. If persistent reports are required, create them in a user-controlled directory with restrictive permissions and explicit overwrite behavior. 5. Consider piping output directly to the parser when multiple passes over the JSON stream are unnecessary. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:250
Finding

Security Assessment Workflow Performs Broad Unconfirmed Dependency Updates

Content
View full analysis
/dev/null go mod tidy 2>/dev/null echo " 依赖已更新" ``` The repair guidance similarly recommends updating all dependencies: ```bash echo " # 更新所有依赖到最新安全版本" echo " go get -u ./..." echo " go mod tidy" echo "" echo " # 更新特定模块" echo " go get module-name@latest" ``` ### Technical Analysis The documented “dependency update assessment” mutates the project's dependency graph as part of the assessment process. `go get -u ./...` may update multiple direct and transitive modules rather than only dependencies associated with confirmed vulnerabilities. `go mod tidy` can then rewrite `go.mod` and `go.sum`. These operations are performed without an explicit approval checkpoint, version pinning, a clean-worktree check, or a reliable rollback procedure. Errors are redirected to `/dev/null`, but the script unconditionally prints that dependencies were updated. This can produce a false success message and cause subsequent scan comparisons to be based on a partially modified or failed state. Updating to mutable latest versions also increases the amount of unreviewed third-party code introduced into the project. The issue is unsafe operational behavior rather than evidence that any particular Go module is malicious. ### Attack Path 1. A user requests a dependency security assessment and the agent follows the documented workflow. 2. The workflow executes `go get -u ./...` without first requesting approval for project modification. 3. Go resolves newer versions across the project's dependency graph. 4. A newly resolved version may contain incompatible behavior, a newly introduced vulnerability, or—if the dependency supply chain is compromised—malicious cod ...[truncated 1188 chars]
Remediation
View remediation
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documented '依赖更新前评估' workflow does more than assess vulnerabilities: it runs go get -u ./... and go mod tidy, which modify dependency versions and project state. In an agent setting, users invoking a security scan may not expect write-side effects, creating integrity and change-management risk even if the intent is operational convenience rather than abuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

These commands update dependencies and rewrite project metadata without a prominent warning, even though the skill is framed primarily as a scanning and assessment tool. In an agent-execution context, silent mutation of go.mod/go.sum can introduce breaking changes, alter reproducibility, or change software supply-chain state unexpectedly.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger description says to use the skill for broad situations like '安全检测、合规审计、质量检查、加密防护', which overlaps with many general security or quality tasks beyond this skill's actual govulncheck-based Go dependency scanning scope. It does not provide specific invocation phrases, boundaries, or negative examples beyond a generic exclusion, increasing the risk of unintended activation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The safe_go_update example performs real dependency upgrades and a rollback attempt while presenting itself as a best-practice helper, but it does not prominently warn that it changes project files and may not restore the exact prior state. In autonomous or semi-autonomous agent use, this can lead to unintended repository modifications and unreliable rollback behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The FAQ states that the free edition focuses on dependency vulnerabilities and that code security analysis requires the professional version. Elsewhere, the documented execution flows run go vet and go build, which are not dependency-vulnerability checks and contradict the claimed narrow free-version scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description states '支持中文交互', and the document consistently frames usage in Chinese without indicating that language is optional or user-selectable. This can constitute a language policy issue because it implies a fixed locale preference rather than offering opt-in or alternatives.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The impact-assessment flow writes govulncheck JSON output to /tmp/vuln-results.json before parsing it. While result processing is related to the skill's purpose, persistent temporary file creation is an additional capability not declared in the high-level description, which presents the tool mainly as a scanner and assessor.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest and feature comparison position the free version as centered on govulncheck-based dependency vulnerability detection. In the '项目上线前安全检查' scenario, the workflow also runs go build ./... and go vet ./..., expanding behavior into compilation and general static analysis beyond the stated dependency-vulnerability scope.

Content

No source excerpt is available for this finding.