Back to skill

Security audit

go-dev

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marked this Go development tooling skill suspicious because it recommends running an unverified installer downloaded from the internet, and some referenced content was only partially inspected.

Consider not installing until the installer instructions are replaced with a download whose integrity is verified independently. The scanner’s overall coverage was partial: 7 of 11 components were fully inspected, and several others had analyzer limits or could not be fully evaluated. The suspicious verdict indicates real concerns, not a finding that the author acted maliciously.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (38)

Self-Modification

High
Category
Rogue Agent
Confidence
90% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · CHANGELOG.md (reported line 55)May include surrounding context.

md
- The template's `nolintlint` now sets `require-explanation` and `require-specific`; both default to false, so "enforced by nolintlint" was not true.
- `exhaustive` 0.15.0 renamed its options; the old names fail `config verify` (exit 3).
- setup-go's default cache key hashes `go.mod`, not `go.sum`; it also ignores the `toolchain` line once `GOTOOLCHAIN=local` is set.
- The lefthook lint job split staged file names on whitespace; `glob_matcher: doublestar` makes `*.go` match only root-level files; `self-update` is absent from package-manager builds.
- `go tool golangci-lint` examples in the lefthook and Justfile references contradicted the skill's own advice; tool-directive dependency bleed applies to every tool.
- golangci-lint config discovery starts from the first analyzed path; `golangci-lint migrate` still writes the deprecated gofumpt `extra-rules`; gopls short-form key in the Helix example.

Self-Modification

High
Category
Rogue Agent
Confidence
90% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · references/lefthook-reference.md (reported line 195)May include surrounding context.

md
| `lefthook dump` | Print the merged effective config |
| `lefthook add <hook>` | Scaffold a hook and its script directory |
| `lefthook check-install` | Report whether hooks are installed |
| `lefthook self-update` | Update the binary in place - GitHub-release and source builds only; package-manager builds such as Homebrew compile it out (build tag `no_self_update`) |
| `lefthook version` | Print the version (`--full` includes the commit) |

Three install behaviours worth knowing:

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

The supplied function performs deletion rather than configuring or running the declared Go tooling. Its path validation and rooted filesystem access constrain deletion to the supplied base, but do not establish that cache purging is a supporting part of the declared workflow. The chunk defines the capability; it does not show the function being invoked.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
97% confidence
Finding

The quick-start command streams a remote installer directly into a shell without verifying its integrity or authenticity independently of the hosting endpoint. Although the URL is the tool's expected distribution site and the requested binary version is pinned, a compromised installer endpoint could execute arbitrary code with the developer's or agent's permissions.

Content

Scanner excerpt · SKILL.md (reported line 58)May include surrounding context.

md
mkdir -p cmd/myapp internal migrations

# 3. Install golangci-lint as a binary, not as a module tool (see note below)
curl -sSfL https://golangci-lint.run/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.15.0

# 4. Track the rest in go.mod (Go 1.24+ tool directive). Pin versions - never @latest,
#    which recompiles the tool on every CI run and drifts between machines.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 72)May include surrounding context.

md
.mod`, isolate it behind its own `-modfile` - see the [golangci-lint Reference](references/golangci-lint-reference.md). The bleed is not specific to golangci-li

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 195)May include surrounding context.

md
idigo` settings rather than in shell checks - see the [golangci-lint Reference](references/golangci-lint-reference.md).

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 541)May include surrounding context.

md
Action inputs for monorepos and `go.work` are in the [golangci-lint Reference](references/golangci-lint-reference.md).

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 569)May include surrounding context.

md
`--new-from-rev=<rev>` do the same locally - see the [golangci-lint Reference](references/golangci-lint-reference.md) for the full set.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 588)May include surrounding context.

md
- [golangci-lint Reference](references/golangci-lint-reference.md) - v2 config, linter catalog, recommended sets, nolint syntax

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 74)May include surrounding context.

md
run a tool declared in any workspace module" - see the [Go Toolchain Reference](references/go-toolchain-reference.md).

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 80)May include surrounding context.

md
oolchain` line - compiles the binary you ship (see the [Go Toolchain Reference](references/go-toolchain-reference.md)). A CI step that fails when these disagree

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 383)May include surrounding context.

md
{{.Dir}}/...')` replaces the per-module jobs - see the [Go Toolchain Reference](references/go-toolchain-reference.md).

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 583)May include surrounding context.

md
ublish from one config; CI and release ordering in the [Go Toolchain Reference](references/go-toolchain-reference.md) |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 595)May include surrounding context.

md
- [Go Toolchain Reference](references/go-toolchain-reference.md) - `go.work` workspaces, tools and dependencies, build and test caches, version stamping and ins

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
80% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

Scanner excerpt · SKILL.md (reported line 460)May include surrounding context.

md
auto-detect only a root `.golangci.*`, so filing it under `.github/` costs in-IDE linting even if you pass `--config`. lefthook auto-discovers only the repo root or `.config/` - move `lefthook.yml` anywhere else and commits silently stop running hooks, because git invokes the hook directly and no task-runner recipe can intercept that.

**lefthook is dormant until installed.** The binary being absent from PATH, or `lefthook install` never having run, both present as "hooks just don't fire" with no warning. Set `assert_lefthook_installed: true` so this fails loudly, pin lefthook as a repo tool, and make `lefthook install` part of onboarding. A leftover `core.hooksPath` (husky, pre-commit) is a third cause: `lefthook install` stops when it is set, until you run `lefthook install --reset-hooks-path`.

**A stale lint cache invents issues.** golangci-lint can report failures in files that no longer exist on disk - typically after a branch switch or a deleted worktree. The costlier variant i

External Script Fetching

High
Category
Supply Chain
Confidence
97% confidence
Finding

The existing-project migration instructions repeat immediate execution of an unverified remote installer. Pinning the requested golangci-lint version does not pin the installer script, so compromise of the distribution endpoint could expose project files and credentials accessible to the executing account.

Content

Scanner excerpt · SKILL.md (reported line 547)May include surrounding context.

bash
# 1. Install tools (golangci-lint as a binary - see Quick Start)
curl -sSfL https://golangci-lint.run/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.15.0
go install mvdan.cc/gofumpt@v0.12.0
go install gotest.tools/gotestsum@v1.13.0

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 590)May include surrounding context.

md
- [gotestsum Reference](references/gotestsum-reference.md) - output formats, watch mode, JUnit XML, CI recipes

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 593)May include surrounding context.

md
- [Justfile Reference](references/justfile-reference.md) - Go-specific recipes, task groups, lefthook integration

Privileged Container / Container Escape

High
Category
Privilege Escalation
Confidence
80% confidence
Finding

Potential security issue detected. Manual review is recommended.

Content

Scanner excerpt · references/go-migrate-reference.md (reported line 31)May include surrounding context.

go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@v4.20.1

Docker

docker run -v $(pwd)/migrations:/migrations --network host migrate/migrate:v4.20.1
-path=/migrations/ -database "postgres://localhost:5432/db" up

text

Credential Access

High
Category
Privilege Escalation
Confidence
80% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/go-toolchain-reference.md (reported line 123)May include surrounding context.

md
## Private Modules

`GOPRIVATE` (a comma-separated glob list such as `github.com/yourorg/*`) makes the `go` command skip the public proxy and the checksum database for matching modules - the usual fix when golangci-lint's `typecheck` or `go mod download` fails fetching a private module from `proxy.golang.org` or `sum.golang.org` (`410 Gone`, `404 Not Found`). CI then needs read credentials for those repos (a `.netrc`, `GOAUTH` - "a semicolon-separated list of authentication commands for go-import and HTTPS module mirror interactions", for example `GOAUTH="git $PWD"`, which runs `git credential fill` in that directory - or `git config url."https://***@github.com/".insteadOf`), and a Docker build needs them as a BuildKit secret (`RUN --mount=type=secret,id=netrc,target=/root/.netrc go mod download`), never as a build arg baked into a layer.

## Container Builds

Credential Access

High
Category
Privilege Escalation
Confidence
80% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/go-toolchain-reference.md (reported line 123)May include surrounding context.

md
## Private Modules

`GOPRIVATE` (a comma-separated glob list such as `github.com/yourorg/*`) makes the `go` command skip the public proxy and the checksum database for matching modules - the usual fix when golangci-lint's `typecheck` or `go mod download` fails fetching a private module from `proxy.golang.org` or `sum.golang.org` (`410 Gone`, `404 Not Found`). CI then needs read credentials for those repos (a `.netrc`, `GOAUTH` - "a semicolon-separated list of authentication commands for go-import and HTTPS module mirror interactions", for example `GOAUTH="git $PWD"`, which runs `git credential fill` in that directory - or `git config url."https://***@github.com/".insteadOf`), and a Docker build needs them as a BuildKit secret (`RUN --mount=type=secret,id=netrc,target=/root/.netrc go mod download`), never as a build arg baked into a layer.

## Container Builds

External Script Fetching

High
Category
Supply Chain
Confidence
98% confidence
Finding

The recommended installation command pipes a mutable remote script directly into a shell without verifying its contents or authenticity against an independently trusted artifact. Compromise of the hosting site or delivery infrastructure could execute arbitrary code with the developer's or CI job's permissions; pinning the requested tool version does not pin the installer script.

Content

Scanner excerpt · references/golangci-lint-reference.md (reported line 11)May include surrounding context.

bash
# Binary (recommended)
curl -sSfL https://golangci-lint.run/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.15.0

# Homebrew - "Homebrew can use an unexpected version of Go to build the binary",
# and it cannot pin a version. Prefer the binary installer.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/justfile-reference.md (reported line 22)May include surrounding context.

just
set shell := ["bash", "-euo", "pipefail", "-c"]   # Strict bash: errexit, undefined vars, pipefail
set dotenv-load                                    # Load .env file

# Recipe with doc comment
recipe-name:

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/justfile-reference.md (reported line 158)May include surrounding context.

just
set shell := ["bash", "-euo", "pipefail", "-c"]   # Shell and flags
set dotenv-load                                    # Auto-load .env
set export                        # Export all variables as env vars
set quiet                         # Suppress command echo by default
set positional-arguments          # Pass args as $1, $2, etc.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/justfile-reference.md (reported line 163)May include surrounding context.

md
set quiet                         # Suppress command echo by default
set positional-arguments          # Pass args as $1, $2, etc.

set dotenv-path := ".env.local"   # Load a specific env file - an error if it is missing
set dotenv-required               # Fail if the env file is missing
set dotenv-override               # .env wins over the ambient environment
set working-directory := "backend"  # Default dir for every recipe