Solutions · OSS maintainers

Every fork is a potential attacker.
LGTM reads every PR before you do.

Open-source maintainers have a problem no closed-source team has: every incoming PR is from a stranger, possibly adversarial. Supply-chain attacks against OSS repos — self-hosted runner abuse, pull_request_target exploits, dependency confusion — keep showing up in postmortems. LGTM reviews every PR with 6 AI agents and 16 deterministic security detectors so you catch the bad ones before they merge.

The OSS-specific threat model

Closed-source teams worry about bugs. OSS maintainers also worry about malicious contributors — and they've been burned. A non-exhaustive list of real attack patterns LGTM Security catches:

Self-hosted runner on a public repo

A maintainer adds runs-on: self-hosted for the CI to use a beefy build machine. An attacker forks, opens a PR that exfils AWS credentials via the runner. Several real-world incidents have happened this way. LGTM flags self-hosted runners on any workflow triggered by pull_request from forks.

pull_request_target + checkout PR code

The "pwnrequest" pattern: pull_request_target runs with base-repo secrets, but if combined with actions/checkout@v4 ref: ${{ github.event.pull_request.head.sha }} it checks out fork-controlled code. Fork code now has access to your secrets. LGTM Security flags this exact combination.

Mutable action refs

actions/checkout@v3 looks safe but v3 is a moving tag. If actions/checkout were ever compromised, the tag could be retagged to a malicious commit. LGTM flags any action pinned to a tag/branch instead of a full commit SHA — across all your workflows.

Secret echo in workflow run blocks

Subtle: a contributor's PR adds run: echo "$SECRET" | base64. GitHub's secret-masking pass doesn't catch base64'd values. The secret leaks in CI logs. LGTM flags echo + base64 + secret combos at PR time.

Untrusted input flowing into shell

PR title becomes shell: run: echo "PR: ${{ github.event.pull_request.title }}". A malicious title injects commands. LGTM Security catches the pattern across run blocks and script: blocks.

Permissions block missing

Without an explicit permissions: block, workflows inherit the repo-wide default — historically write-all. A compromised step can mint releases, push tags, or read every secret. LGTM Security flags missing permissions: at the top of every workflow.

See the full 16-detector list on the LGTM Security product page. Each rule has a severity, why-it-matters explanation, and a sample trigger.

What LGTM does on an incoming PR

From the maintainer's perspective: a stranger's PR opens. Three things happen automatically.

Step 1

Security pre-screen

The 16 deterministic detectors run on the diff. If a PR adds a self-hosted runner workflow or pull_request_target + checkout-head-sha, the merge-block Check Run lights up red. You see it before you even open the PR.

Step 2

Bug + readability review

The 6 AI agents read the diff and post inline comments. You get a synthesizer verdict + top findings. Even if you skim the PR, the agents have already flagged the obvious issues.

Step 3

Style + convention feedback

The convention extractor knows your repo's patterns (HTTP client, error handling, naming). The reviewer flags when a contributor's PR uses moment.js in a date-fns repo — helpful nudges, not gatekeeping.

What contributors see

LGTM is opt-in to your repo, not your contributors'. They don't sign up. They don't add a key. From their side it looks identical to a maintainer review — just faster.

Example LGTM comment on a contributor PR

LGTM Review: request_changes · Confidence 82%

Thanks for the contribution! Two things to address before merge:

  • · Line 24 of workflow.yml: actions/checkout@v3 pinned to a mutable ref — pin to a commit SHA. (workflow.action-pinned-to-mutable-ref)
  • · Line 88 of cache.ts: getUser() can return null but the caller derefs .email without a guard.

Contributor reads, makes the changes, pushes. The maintainer never had to type the explanation — and the contributor learned the pattern for next time.

Why deterministic checks beat LLM-only review for security

LLM-based reviewers will sometimes miss the supply-chain patterns above — model attention is finite, security signals are easy to miss in long diffs. LGTM Security runs separate deterministic detectors on top of the 6 AI agents:

Deterministic

Same diff, same finding. No LLM moodiness. A regulator can re-run the scan and reproduce the result.

Free + open

The detectors are part of LGTM Free read-only access. You can see every finding without paying. Pro adds enrollment + alerts + watchdog.

No source leaves your repo

Security detectors operate on the diff hunks LGTM already has. No additional source-code exposure beyond the standard review pipeline.

For maintainers of large / high-traffic OSS

If you maintain a repo with hundreds of incoming PRs per month, here's how we can help — and what's honestly out of scope.

Where LGTM helps

  • Filters PRs into "obviously needs work" vs "ready for human review"
  • Catches supply-chain attack patterns deterministically
  • Provides consistent style/convention feedback so you don't have to repeat it
  • Audit log keeps a record of every security finding (useful when a CVE post-mortem asks "was this flagged?")

What's out of scope

  • ·Judgement calls about architecture / API design — LGTM doesn't know your project goals
  • ·Whether a feature should be merged at all — that's your call
  • ·Community / interpersonal dynamics — auto-comments can feel impersonal; you decide how to use them
  • ·Replacing a CODEOWNERS workflow — LGTM augments, doesn't replace, your existing process

OSS-maintainer FAQ

Does LGTM cost money for OSS?

The Free tier gives you 20 reviews/month. For an average-traffic OSS repo, that's often enough. For high-traffic OSS, Pro at ₹399/mo gives unlimited reviews + auto-review on every PR. If you maintain a notable OSS project and Pro feels heavy, email tarinagarwal@gmail.com — we're open to OSS-friendly arrangements.

Do contributors need to sign up for LGTM?

No. LGTM is opt-in for the repo owner, not contributors. From the contributor's perspective they just see reviewer comments faster.

Will LGTM auto-merge PRs?

No. LGTM posts a review comment + Check Run; your branch protection rules decide whether to merge based on the Check Run status. You always have the final call. We don't auto-merge anything.

Can LGTM close abandoned PRs / lock issues?

No — LGTM's permissions are scoped to "post review comments + Check Runs". We don't have authority to close, lock, or label. Use other tooling (Probot apps, stale bot, etc.) for community management.

What about license-checking + DCO?

Out of scope. LGTM is focused on code review + CI/CD security. License compliance and DCO checking are better served by existing dedicated bots (CLA-bot, DCO check app). LGTM works alongside them.

What if a contributor PR adds malicious code?

The 6 AI agents will likely catch obvious malice (suspicious shell commands, encoded payloads, secrets being added). The 16 deterministic detectors catch the specific supply-chain attack patterns (self-hosted runner abuse, pull_request_target exploits). Both together raise the floor — but neither is a substitute for thoughtful maintainer review of the actual change. Treat LGTM as the first pass, not the last.

Can I see the source of LGTM Security's detector rules?

The rule logic isn't open-source today, but every detector has a documented description, severity, and sample trigger on the LGTM Security page. The runtime watchdog GitHub Action source is open (MIT-licensed). If detector source matters to you for OSS contribution, email us — we're open to publishing rule definitions.

Does LGTM respect CODEOWNERS?

Indirectly — LGTM doesn't request reviews from specific people (that's your branch protection rules + CODEOWNERS file). LGTM just posts its own review, which lives alongside any human reviews the CODEOWNERS automation requests.

Free, automated, supply-chain-aware review for your OSS

Install the GitHub App. Connect the repo. The next incoming PR gets reviewed by 6 AI agents + scanned by 16 security detectors. The maintainer's side is unchanged.