ci: add hidden-unicode lint via weaviate/weaviate composite#566
Draft
mpartipilo wants to merge 1 commit intomainfrom
Draft
ci: add hidden-unicode lint via weaviate/weaviate composite#566mpartipilo wants to merge 1 commit intomainfrom
mpartipilo wants to merge 1 commit intomainfrom
Conversation
Delegates the trojan-source / hidden-unicode scan to the weaviate/weaviate/.github/actions/security-lint composite action shipped in weaviate/weaviate#11093, pinned to its merge commit (3e52fc80a244f4644d4facc6a4e705ea6eda9039). Uses pull_request_target so the workflow definition runs from the base branch and PR-controlled refs are never executed; the composite fetches the diff via the GitHub API.
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
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
Adds a
pr-security-lint.yamlworkflow that scans every PR diff for hidden Unicode / trojan-source characters (https://trojansource.codes/) by delegating to the reusable composite action shipped in weaviate/weaviate#11093 — pinned to the merge commit3e52fc80a244f4644d4facc6a4e705ea6eda9039.This replaces the per-repo bash that other clients had been carrying separately. java-client previously had no unicode scan; this is net-new coverage.
Why a composite, not inline bash
Single source of truth for the scan logic across all 5 client repos. The composite is pinned to a 40-char SHA, so an upstream change can't alter what runs here without an explicit version bump in this file.
Security notes
pull_request_targetruns the workflow definition from the base branch, never from the PR.permissions: {}at workflow level;pull-requests: readis the only grant.github.tokenonly to fetch the diff via the GitHub API.Tradeoffs of delegating to an upstream composite
Pros
pull_request_targetruns the workflow definition from the base branch and the composite never checks out PR-controlled refs — a malicious PR can't alter the linter that's checking it.permissions: {}at workflow level,pull-requests: readat job level, no secrets referenced.Cons
weaviate/weaviate/.github/actions/security-lintbreaks all 5 clients until the SHA is bumped.pull_request_targetis a foot-gun — a future editor addingref: pull_request.head.shaor referencing a secret would re-introduce the attack surface this design is built to avoid. The file header warns against it, but the discipline lives in the reviewer.weaviate/weaviaterather than this repo, so debugging a false positive requires hopping to another repo to read the script.Test plan
🤖 Generated with Claude Code