How Polyscan works
What happens between the install and the report.
What an audit does
- 1
Fetch the code
Polyscan fetches the repository from GitHub. Audits run on a schedule (weekly by default) and skip repositories that have not changed since the last one.
- 2
Measure with analysis tools
Open source analysis engines measure complexity, duplicated code, unused code and the dependencies between parts, across the whole repository. The same code always produces the same numbers.
- 3
Scan for security problems
It looks for API keys and passwords left in the code, and for libraries with known vulnerabilities. For Python it also detects code patterns that are easy to exploit.
- 4
The AI reads the code and narrows it down
For the important findings, the AI reads the code in question and drops false alarms and deliberate design choices. What remains becomes up to ten recommendations, each with the file and line.
- 5
Report in a GitHub Issue
The overall score, the score for each area, the security findings and the recommendations go into a single Issue. Later audits update that Issue and add a comment with what changed since last time.
Why analysis tools and AI together
Analysis tools cover the whole repository, by the same standard every time. What they cannot do is tell whether a finding is a real problem or something written that way on purpose. When hundreds of warnings arrive unfiltered, people stop reading them.
An AI on its own can read code and judge it, but what it looks at and how it judges change from run to run. Polyscan splits the work: tools measure, the AI judges. Because the AI starts from the measurements and then reads the code, every recommendation comes with the file and line it rests on.
Security findings are listed as the scanners reported them. The AI narrows down the code quality findings.
What is measured for each language
| Language | Code quality | Security |
|---|---|---|
| Python | Complexity, duplication, unused code, dependencies, design of parts | Credentials, vulnerable libraries, exploitable code patterns |
| JavaScript / TypeScript / Go / Java | Complexity, duplication, dependencies, design of parts | Credentials, vulnerable libraries |
| Rust | Complexity, duplication, design of parts | Credentials, vulnerable libraries |
| C++ | Complexity, duplication | Credentials, vulnerable libraries |
An area that is not measured is left out of the score. It is never counted as clean.
Pull request review (optional)
When turned on, Polyscan analyzes what a pull request changed and comments on problems such as logic that has become too complicated, before the merge. The scheduled audit looks at the whole codebase; this catches new problems as they come in. Duplicated code and security problems are found by the scheduled audit, which sees the whole repository.
One file for settings
With no file, Polyscan runs on its defaults. To change them, add .github/polyscan.yml to the repository. It sets the report language, the directories to audit, the audit interval and pull request review.
.github/polyscan.yml
# Report language (default: en)
language: ja
# Target directories (default: all)
target_directories:
- src/
# Audit interval (default: weekly)
audit_interval: weekly
# PR review (default: false; private repos need Pro)
pr_review: trueWhy you can trust it with your code.
Not sent to outside AI services
Your code is analyzed by AI running on servers we operate ourselves. It is not sent to external generative AI services.
Not stored
Once the report is posted to GitHub, the code we fetched is discarded.
Only the permissions it needs
Polyscan asks to read code, comment on pull requests, and create the Issue that holds the report. Nothing else.
Start with one repository and see the result.
Installing means choosing repositories. Public repositories are free, and the first report usually arrives within minutes.