LogDrop Taint for Flutter
Taint data-flow analysis for Dart and Flutter source code
LogDrop Taint follows a value from a source—user input, a server response, or a constant in code—to a sink, and reports the values that arrive without being sanitised.
It also reports hardcoded credentials and crypto keys, disabled TLS validation, and unsafe WebView configuration.
The analyzer opens no network connection: not for licensing, usage counting, or telemetry. The licence is verified offline.
No source in the report, ever. Most analyzers put the offending line into the SARIF. This one does not: a finding is a rule, a file, and a line. There is no flag to turn it on, because there is no reason a report needs to carry your code.
The iOS, Android, and React Native analyzers emit the same SARIF report shape, and the signed suppressions format is shared.
GitHub Actions
The LogDrop Taint Action runs the scan as a step of a GitHub Actions workflow, here on every pull request. It reads your licence key from the repository secret LOGDROP_LICENSE.
name: Security scan
on: [pull_request]
jobs:
taint:
runs-on: ubuntu-latest # Linux. No Flutter or Dart SDK.
permissions:
contents: read
security-events: write # only if you upload to Code Scanning
steps:
- uses: actions/checkout@v4
- uses: initialcodess/logdrop-taint-flutter-action@v1
with:
license: ${{ secrets.LOGDROP_LICENSE }}
path: . # scan the repositoryThat is the whole minimum. Findings appear inline on the pull request and in the job summary, and the build stays green—see The scan is advisory.
It parses, it never resolves
The analyzer reads your Dart with parseString, so it never resolves a package graph. There is no pub get, no .dart_tool, no dependency download, and no Flutter or Dart SDK on the runner. It runs on a checkout exactly as it arrives.
That is why the scan is fast and why it works on a repository that does not currently build.
Pin by commit SHA, not @v1
In a workflow, @v1 after the action's name is a tag that moves to each new 1.x release. A commit SHA names one fixed version of the action instead.
- uses: initialcodess/logdrop-taint-flutter-action@a1b2c3d4...This action runs inside your CI with your source checked out. A moving tag means its owner decides what executes there, whenever they like. A SHA means you decide.
It also pins the checksum the installer verifies the analyzer against. That table lives inside the action, not beside the download, precisely so that replacing a release is not enough to change what runs on your machine.
@v1 is maintained and tracks the latest 1.x: the release flow moves it onto the commit that carries the pins, and the release gate fails unless @v1 and @vX.Y.Z name the same commit.
gh api repos/initialcodess/logdrop-taint-flutter-action/commits/v1 --jq .shaThe scan is advisory
fail-on defaults to never: findings are reported and the build stays green. This is a product decision, not an oversight. A scanner that breaks someone's pipeline on its own judgement gets removed from the pipeline.
Opt into a gate when you want one:
with:
license: ${{ secrets.LOGDROP_LICENSE }}
fail-on: high # critical | high | medium | low | neverFlutter and React Native take a levelled fail-on. iOS and Android take a boolean fail-on-findings. The inputs are not interchangeable; a fail-on-findings: "true" on this action is an unrecognised input and gates nothing.
Run it without GitHub
Outside GitHub Actions, for example on another CI system or your own machine, run the analyzer directly. The analyzer is one self-contained binary, published for linux-x64 and macos-arm64.
# Download and verify once; change the version when needed
V=v1.0.3
T=linux-x64 # macos-arm64 on an Apple Silicon Mac
curl -fsSL -o install.sh \
"https://raw.githubusercontent.com/initialcodess/logdrop-taint-flutter-action/$V/examples/install-logdrop-taint.sh"
chmod +x install.sh
LOGDROP_VERSION=$V LOGDROP_DIR="$HOME/logdrop" ./install.sh
# Run it. The installed binary carries its version and target in the name, and
# the installer prints the full path it wrote.
export LOGDROP_LICENSE="LOGDROP...."
"$HOME/logdrop/logdrop-taint-flutter-$V-$T" . \
--sarif report.sarif --fail-on highUse it in several environments:
- Developer machines: scan your own source before pushing.
- Build servers: Jenkins, TeamCity, Bitrise, or a Mac mini. Exit code
1means findings at or above--fail-on. - Self-hosted runners: run the Action as-is.
The output is standard SARIF 2.1.0 and works with SARIF viewers or your own dashboard.
Where findings appear
All three views work on every GitHub plan:
- Pull request annotation: the finding appears above the relevant line in Files changed.
- Job summary: the run page shows a location, rule, and finding table.
- CI gate: with
fail-onset to a level, findings at or above it block the merge.
If Code Scanning is enabled, SARIF is uploaded there too. It is free for public repositories and depends on GitHub Code Security licensing for private ones. When upload is unavailable, the step warns and continues; it does not break the build.
Test code is skipped
Test fixtures are where fake credentials live, and in the code they are indistinguishable from real ones. Test files are excluded by default. Set include-tests: "true" to scan them.
What it finds
Eight rules, from three engines. The ids carry the engine, because the three ask different questions: TAINT asks whether a value reached a dangerous place, CONFIG asks whether a setting is unsafe, and STRUCT asks whether the line itself is wrong.
Data flow
These rules follow a sensitive value from where your code gets it to a place where it leaks: the device log, unencrypted local storage or the clipboard.
| Rule | CWE | What it reports |
|---|---|---|
FL-TAINT-PII-LOG | CWE-532 | Sensitive data written to the device log, including inside a ${...} interpolation |
FL-TAINT-CREDENTIALS-LOCAL-STORE | CWE-312 | A credential written to unencrypted local storage, such as SharedPreferences |
FL-TAINT-CLIPBOARD | CWE-200 | A recovery key, a TOTP seed, or a card number copied to the system clipboard |
The line itself
These rules look at one line on its own, with no flow to follow: a key or credential written into the source, or a certificate check that accepts everything.
| Rule | CWE | What it reports |
|---|---|---|
FL-STRUCT-HARDCODED-CRYPTO-KEY | CWE-321 | A cryptographic key written into the source |
FL-STRUCT-HARDCODED-CREDENTIAL | CWE-798 | A credential written into the source |
FL-STRUCT-TLS-VALIDATION-DISABLED | CWE-295 | A certificate check that accepts every certificate |
WebView configuration
A WebView shows web content inside your app. These rules check whether the WebView lets its content reach native code, and whether it is handed content assembled at run time.
| Rule | CWE | What it reports |
|---|---|---|
FL-CONFIG-WEBVIEW-UNGUARDED-BRIDGE | CWE-749 | The WebView opens a native channel to content it does not restrict |
FL-CONFIG-WEBVIEW-DYNAMIC-CONTENT | CWE-79 | The WebView is handed content assembled at run time |
The three data-flow rules were measured on nine real Flutter applications before any of them shipped: 12 findings, zero false positives, every one read in source. The acceptance records live in the analyzer repository.
Send reports to the LogDrop panel
Panel reporting is optional and off by default. Enable it to track findings over time, view binary and source scans for the same app together, and carry false-positive decisions across scans.
- uses: initialcodess/logdrop-taint-flutter-action@v1
with:
license: ${{ secrets.LOGDROP_LICENSE }}
bundle-id: com.company.app
panel-url: https://analyze.logdrop.ioSending requires panel-url, license, and bundle-id together. Without all three, nothing is sent. The bundle id must be registered for the project; an unknown id is rejected so a typo cannot fail silently.
Only the SARIF is sent, and because this analyzer never writes a source line into the report, no line of your code travels with it.
A panel that is down, a licence moved between projects, or a bundle id deleted in the panel will warn rather than fail your build—none of them is something the developer who opened the pull request can fix. Set fail-on-delivery-error: "true" if you would rather know loudly.
Silence a reviewed finding
Suppress a finding when you have reviewed it and it is not a problem in its context. A suppression records that decision in a file that LogDrop signs and the analyzer verifies.
Judge the finding in the panel and export the signed suppressions file. A suppressed finding stays in the report, marked, and stops failing the gate—it is never silently removed. A file that does not verify, or that has expired, is refused out loud and everything is reported.
Inputs
Inputs are the with: settings of the Action step. Only license is required; bundle-id is also required once you set panel-url.
| Input | Default | What it does |
|---|---|---|
license | (required) | Your licence key. Keep it in a repository secret; it is verified offline. |
path | . | Directory to scan. |
repo-root | ${{ github.workspace }} | Root that SARIF paths are relative to. |
sarif-file | logdrop-taint.sarif | Where to write the report. |
fail-on | never | critical / high / medium / low / never. |
annotations | true | Inline boxes on the pull request. Works on every plan. |
upload-sarif | true | Upload to Code Scanning; warns and continues if it is off. |
include-tests | false | Scan test code too. |
panel-url | — | Send the report to the panel. Empty means nothing is sent. |
bundle-id | — | Required when panel-url is set. |
require-pinned-checksum | false | Refuse an analyzer version this action has no checksum for. |
fail-on-delivery-error | false | Fail the build when the report could not be sent. |
analyzer-version | v1.0.3 | Which analyzer to download. |
There is no snippets input, by design—see the callout at the top of this page.
Exit codes
The analyzer ends with one of these codes. Use them in CI to tell findings apart from a licence or setup problem.
| Code | Meaning |
|---|---|
0 | Clean |
1 | Findings at or above fail-on |
2 | Licence failure |
3 | Bad arguments |
4 | The scan could not complete |
They are kept distinct on purpose: a developer whose licence lapsed must never be told their code has a vulnerability. A licence that cannot be verified stops the scan with 2—it does not fall back to scanning without one.
Requirements and licence
Nothing on the runner. The analyzer is one self-contained binary: no Flutter SDK, no Dart SDK, no pub get, and none of your dependencies. Published for linux-x64 and macos-arm64.
A licence is required and is verified offline—the analyzer makes no network call to check it. Without a valid licence the scan refuses to run and exits 2.
Repository: initialcodess/logdrop-taint-flutter-action
Questions: destek@initialcode.io
.png)