bring repo into compliance with repo policies #14
No reviewers
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/pixa#14
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "chore/repo-compliance"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PR #14 Review: "bring repo into compliance with repo policies"
Summary
This PR makes significant progress toward repo policy compliance. It adds missing files (LICENSE, REPO_POLICIES.md, .editorconfig, CI workflow), pins Docker images by SHA256, pins the GitHub Actions checkout by commit SHA, fixes several lint issues, improves the Makefile with nix-shell fallback, restructures the README, and consolidates config examples.
✅ What's Good
golang:1.24-alpineandalpine:3.21both use@sha256:...with version/date comments. Correct..gitea/workflows/check.yml) —actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683with version comment. Correct..golangci.ymlNOT modified — Good, this is policy.make check=fmt-check lint test, nix-shell fallback, 30s test timeout,make hookstarget. All per policy.make checkas a build step. Per policy.example-config.ymlremoved,config.example.ymlexpanded.❌ Issues —
make checkDoes NOT Passmake checkfails on the PR branch with 5 remaining gosec findings:Per repo policy:
mainmust always passmake check, no exceptions. And per PR quality rules:make checkmust pass with ZERO failures — no exceptions.These are pre-existing on main (main has 16 issues, this PR reduces to 5), but the PR title is "bring repo into compliance" — it should finish the job.
Fix approach: The G703 (path traversal) and G704 (SSRF) findings need proper input sanitization, not nolint annotations. For G703, validate/sanitize file paths before use. For G704, the SSRF finding on
fetcher.goshould be addressed with the existing host whitelist validation (add a//nolint:goseconly if the check is genuinely a false positive because validation happens upstream — document why).⚠️ Minor Notes
REPO_POLICIES.md links to external styleguides by URL, not by hash — These are raw links to
branch/mainon the Gitea instance. The policy itself says "ALL external references must be pinned by cryptographic hash." These are documentation links (not build dependencies), so this is low severity, but worth noting for consistency.golangci-lint version comment says
v2.10.1, 2026-02-25— The SHA256 verification is the real pin, which is correct. The version comment is informational. Good.Verdict
Cannot merge as-is. The PR is a strong improvement (16 → 5 lint issues, adds all required repo scaffolding), but
make checkmust pass cleanly before merge. Fix the 5 remaining gosec findings and this is ready to go.the repo policy about referencing external things by hash applies to software only. linking to documentation is fine because it doesn't change execution paths - it's not RCE.
fff7789dfbto85729d9181make checkoutput (commit85729d9)All checks pass ✅
Full output
Docker build fails at
make check— the golangci-lint binary is amd64 but the image is building for the host arch (arm64 on Apple Silicon):The Dockerfile hardcodes
linux-amd64for the golangci-lint download. It needs to detectTARGETARCHor use$(go env GOARCH)to pick the right binary. Something like:Or simpler:
$(go env GOARCH)since Go is already installed in the builder stage.Note: on a native amd64 build host (like CI) this would work fine. The issue only manifests on arm64 hosts without
--platform linux/amd64.@clawbot fix it