Skip to content

fix(lint): restore G305 nosec suppression dropped in comment cleanup - #884

Merged
skevetter merged 2 commits into
mainfrom
lint/gosec-g305-regression
Aug 5, 2026
Merged

fix(lint): restore G305 nosec suppression dropped in comment cleanup#884
skevetter merged 2 commits into
mainfrom
lint/gosec-g305-regression

Conversation

@skevetter

@skevetter skevetter commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Summary by CodeRabbit

  • Security
    • Documented the safety validation used during archive extraction to prevent unsafe file paths.

The "style: update comments" commit in #879 stripped the #nosec G305
annotation on unzipFile's Zip Slip guard along with unrelated
step-numbering comments, reintroducing the gosec finding on main.
@netlify

netlify Bot commented Aug 5, 2026

Copy link
Copy Markdown

Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit bd984b6
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6a7315a7a915720008b770ae

@netlify

netlify Bot commented Aug 5, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit bd984b6
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6a7315a7e340050008d01920

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a9777ca2-423b-47d8-8e95-f5c0c9488b46

📥 Commits

Reviewing files that changed from the base of the PR and between 3702354 and bd984b6.

📒 Files selected for processing (1)
  • pkg/extract/zip.go

📝 Walkthrough

Walkthrough

The archive extraction code documents its existing path-prefix validation with a #nosec G305 annotation.

Changes

Archive extraction security

Layer / File(s) Summary
Path validation annotation
pkg/extract/zip.go
Adds a #nosec G305 comment that identifies the following HasPrefix check as protection for file-writing paths.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes restoring the G305 suppression removed during comment cleanup.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@skevetter
skevetter merged commit f357e21 into main Aug 5, 2026
67 checks passed
@skevetter
skevetter deleted the lint/gosec-g305-regression branch August 5, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant