-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Publish channel-aware update metadata for Lantern releases #8903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
atavism
wants to merge
1
commit into
main
Choose a base branch
from
atavism/autoupdate
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| name: Verify Update Service | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: "Release version to verify, with or without leading v" | ||
| required: true | ||
| type: string | ||
| channel: | ||
| description: "Release channel to verify" | ||
| required: false | ||
| type: choice | ||
| options: | ||
| - beta | ||
| default: beta | ||
| platform: | ||
| description: "Release platform to verify ('all' or comma-separated platforms)" | ||
| required: false | ||
| type: string | ||
| default: all | ||
| update_url: | ||
| description: "Lantern update endpoint" | ||
| required: false | ||
| type: string | ||
| default: "https://update.getlantern.org/update/lantern" | ||
| timeout_seconds: | ||
| description: "How long to poll the update service" | ||
| required: false | ||
| type: number | ||
| default: 2700 | ||
| interval_seconds: | ||
| description: "Delay between polling attempts" | ||
| required: false | ||
| type: number | ||
| default: 60 | ||
| workflow_call: | ||
| inputs: | ||
| version: | ||
| required: true | ||
| type: string | ||
| channel: | ||
| required: false | ||
| type: string | ||
| default: beta | ||
| platform: | ||
| required: false | ||
| type: string | ||
| default: all | ||
| update_url: | ||
| required: false | ||
| type: string | ||
| default: "https://update.getlantern.org/update/lantern" | ||
| timeout_seconds: | ||
| required: false | ||
| type: number | ||
| default: 2700 | ||
| interval_seconds: | ||
| required: false | ||
| type: number | ||
| default: 60 | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: verify-update-service-${{ inputs.channel }}-${{ inputs.platform }}-${{ inputs.version }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| verify: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repo | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Test update service verifier | ||
| run: python3 -m unittest scripts/ci/verify_update_service_test.py | ||
|
|
||
| - name: Run update service verifier | ||
| run: | | ||
| python3 scripts/ci/verify_update_service.py \ | ||
| --update-url "${{ inputs.update_url }}" \ | ||
| --channel "${{ inputs.channel }}" \ | ||
| --platform "${{ inputs.platform }}" \ | ||
| --version "${{ inputs.version }}" \ | ||
| --timeout-seconds "${{ inputs.timeout_seconds }}" \ | ||
| --interval-seconds "${{ inputs.interval_seconds }}" | ||
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Pass inputs via environment variables to prevent shell injection.
${{ inputs.* }}expressions are expanded by GitHub Actions before the shell executes. If any input (especiallyversion, which may come from a git tag) contains shell metacharacters like$(cmd)or; cmd, arbitrary code would execute on the runner. Exploitability is limited to users with write access, but using env vars is a standard GitHub Actions hardening practice.🛡️ Proposed fix using environment variables
📝 Committable suggestion
🧰 Tools
🪛 zizmor (1.26.1)
[error] 83-83: code injection via template expansion (template-injection): may expand into attacker-controllable code
(template-injection)
[error] 84-84: code injection via template expansion (template-injection): may expand into attacker-controllable code
(template-injection)
[error] 85-85: code injection via template expansion (template-injection): may expand into attacker-controllable code
(template-injection)
[error] 86-86: code injection via template expansion (template-injection): may expand into attacker-controllable code
(template-injection)
🤖 Prompt for AI Agents
Source: Linters/SAST tools