Security review fixes: drop public zipper/unzipper tool, add CSP, least-privilege workflow - #7
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
Conversation
…ast privilege Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Findings from a security scan of this repo (static GitHub Pages site for leksiko.eu — no backend, DB, or dependencies, so no SQL injection or vulnerable-package surface exists). Fixes here cover the one critical item plus the hardening gaps.
Critical —
zipper-unzipper.zipremoved. The archive containedzipper-unzipper.php, an unauthenticated web file manager: any visitor who can reach it can extract any local archive to an arbitrary path ($extpathis onlystrip_tags'd, so../../traversal works) and zip up any directory, e.g.$_POST['zippath'] = '../../wp-config-dir', then download the resultingzipper-<date>.zip— arbitrary file read/write, i.e. effectively a webshell. It has no capability check, no nonce, no auth of any kind. Because it sat in the Pages-published repo root, it was publicly downloadable fromhttps://leksiko.eu/zipper-unzipper.zip. Note the blob remains in git history; if it was ever deployed to a live PHP host, delete it there and treat that host as potentially compromised.index.htmlhardening. Added a CSP meta tag restricting script/style/font/connect and pinningform-actionto formspree,frame-ancestors 'none'(clickjacking),base-uri 'self',object-src 'none', plus a strict referrer policy.'unsafe-inline'is still required for the inline<style>/<script>(no nonces available on static Pages). Also added missingrel="noopener noreferrer"to the four remainingtarget="_blank"links (reverse tabnabbing) andmaxlengthlimits on the contact form fields.Workflow least privilege.
add-issue-to-project.ymlran with the default (write-heavy)GITHUB_TOKENscopes; nowpermissions: {}at top level with onlycontents: read+repository-projects: writeon the job.SECURITY.md was the unedited GitHub template ("Tell them where to go...") with fake version rows; replaced with real scope and reporting instructions.
Not found: no hardcoded API keys or secrets anywhere in the working tree or git history (the Formspree form ID is a public endpoint identifier by design), no SQL, no CORS config, no debug endpoints, no auth-protected routes in the site itself.
Link to Devin session: https://app.devin.ai/sessions/4ffbdcd41d1a4fefb1eba174fd7cc057
Requested by: @liikane