Add stealth leakage checks#8776
Closed
reflog wants to merge 1 commit into
Closed
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a Python-based stealth leakage scanner and integrates it into Android build tooling to detect forbidden Lantern/VPN/billing/OAuth/update identifiers in stealth artifacts.
Changes:
- Adds forbidden-token configuration and a stdlib scanner for files, directories, and ZIP-like Android artifacts.
- Adds unit tests and Make targets for default stealth and stricter no-VPN scans.
- Adds documentation and an optional Android workflow input/step for running leakage checks in CI.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/stealth/forbidden_tokens.json |
Defines forbidden token categories and stealth scan modes. |
scripts/stealth/check_leakage.py |
Implements the leakage scanner CLI and archive/directory scanning logic. |
scripts/stealth/check_leakage_test.py |
Adds unit tests for token detection, archive scanning, allowlists, modes, and missing targets. |
Makefile |
Adds configurable stealth leakage check targets. |
docs/stealth-leakage-checks.md |
Documents usage, modes, and allowlist format. |
.github/workflows/build-android.yml |
Adds optional workflow input and CI step for leakage checks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+312
to
+315
| if is_archive_name(path.name) and zipfile.is_zipfile(path): | ||
| self.scan_archive_file(path, logical, depth=0) | ||
| else: | ||
| self.scan_bytes(logical, path.read_bytes()) |
Comment on lines
+164
to
+166
| - name: Stealth leakage check | ||
| if: ${{ inputs.stealth_leakage_mode != '' }} | ||
| run: make stealth-leakage-check |
Contributor
Author
|
Superseded by #8777, which contains the validated stealth leakage-check implementation. |
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
Tests
Closes getlantern/engineering#3570