Skip to content

Fix gosec shell alias finding#19

Merged
aksOps merged 1 commit into
mainfrom
fix-gosec-shell-check
Jun 4, 2026
Merged

Fix gosec shell alias finding#19
aksOps merged 1 commit into
mainfrom
fix-gosec-shell-check

Conversation

@aksOps

@aksOps aksOps commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Suppress the intended G204/G702 gosec findings for the shell alias preflight with an explicit justification
  • Preserve existing validation: command aliases are constrained before fallback and shell-quoted before reaching the interactive shell

Root cause

The main branch Security workflow failed in Gosec static analysis because gosec reported G702 on internal/adapter/tmux_adapter.go:150. The code already documented the G204 shell execution case, but the taint analyzer now emits G702 for the same validated shell alias preflight path.

Verification

  • gosec -exclude-dir=.claude -exclude-dir=vendor ./...
  • skill://sonar-predictor/bin/sonar --format text check --diff
  • go test -count=1 ./...
  • make build
  • make lint

@sonarqubecloud

sonarqubecloud Bot commented Jun 4, 2026

Copy link
Copy Markdown

@aksOps aksOps merged commit dd7417b into main Jun 4, 2026
13 checks passed
@aksOps aksOps deleted the fix-gosec-shell-check branch June 4, 2026 02:20
aksOps added a commit that referenced this pull request Jun 4, 2026
aksOps added a commit that referenced this pull request Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant