Source code security review
If you review code in GitHub or own an application your team ships, this guide will help you choose what to audit and interpret the results. You’ll see how Pentoma Code treats a pull request differently from a repository audit, and how to turn a finding into a change you can review.
What a code audit covers
A source code security review looks for patterns in the code that can lead to a weakness. It lets your team inspect the relevant file and revision while a change is still easy to discuss. A static finding might point to code that builds a query from input, or to a credential exposed in a source file. In both cases, the location gives the reviewer a point of entry.
Pentoma Code uses Semgrep rule sets for the OWASP Top 10 and CWE Top 25. Its language packs cover TypeScript, JavaScript, Python, Go, Java, Ruby, and PHP. It also checks for secrets in the working tree and uses AI to review pull request diffs. Consider those sources of evidence when deciding how thoroughly a change was examined.
| Coverage | Evidence |
|---|---|
| Pull request | Static evidence from the diffThe audit evaluates the change. AI reviews the diff, and one summary comment lists the top findings and links to the results. |
| Default branch or manual run | Static evidence from the repositorySemgrep and secret detection assess the checked-out repository. AI triage still explains individual findings and proposes fixes. |
| Runtime behavior and prior commits | Not covered todayStatic evidence leaves runtime exploitability open. Secret detection covers the working tree and does not inspect Git history. |
- Pull request
- Static evidence from the diffThe audit evaluates the change. AI reviews the diff, and one summary comment lists the top findings and links to the results.
- Default branch or manual run
- Static evidence from the repositorySemgrep and secret detection assess the checked-out repository. AI triage still explains individual findings and proposes fixes.
- Runtime behavior and prior commits
- Not covered todayStatic evidence leaves runtime exploitability open. Secret detection covers the working tree and does not inspect Git history.
How a GitHub audit runs
Choose the trigger based on the question you need to answer. A pull request audit is useful when you’re deciding whether a change introduces a security issue. Use a default-branch or manual audit for a broader view of the repository. Record which revision was reviewed so the result stays useful after the code changes again.
You connect the repository
Use the GitHub App and give it access to the repository you intend to audit. Identify the pull request or branch you want the team to review.
Pentoma analyzes the applicable scope
A pull request uses the diff. A push to the default branch or a manual run checks the repository. The coverage record describes what ran and what was skipped or limited.
Pentoma triages the candidates
AI triage rates severity, describes root cause and impact, and proposes a fix. On a pull request the summary links developers to the findings.
Your team reviews the proposed change
Bring the evidence to the code owner and decide what to fix. Use your normal review and test process to evaluate the patch.
What static evidence means
The exhibit shows a finding at a specific file and line. That evidence carries a different meaning from a web finding confirmed against a deployed target. A source review tells you which expression or control warrants attention. Whether a user can reach it in the running app, and with what privileges, may depend on routing, configuration, and deployment context.
Trace the issue through enough of your code to decide whether the reported impact applies. A rule match can help you locate an unsafe pattern, and a guard elsewhere might restrict where it can be reached. Check those assumptions with the owning team before you treat a suggested severity as the final priority.
How to use the findings
Start with the coverage record in the PDF report. Confirm that the analysis included the revision and files you care about, and read any skipped paths or tool limits. If a section is partial, ask what evidence your team needs to evaluate the rest. Then use the findings index to assign each issue to the owner who can make the change.
The report excerpt turns a code location into a proposed fix. For input passed to a database query, a parameterized statement makes the expected change reviewable. Check that the fix preserves normal behavior and applies to any other callers that use the same query construction. Add a regression test at the boundary where the application handles untrusted input.
Invoice lookup builds SQL with string interpolation
The lookup passes untrusted input to a SQL query. The report shows the affected line and a fix.
- WHERE ref = '${ref}'`);
+ WHERE ref = $1', [ref]);- CWE-89
- OWASP A05:2025
- Line-level fix
What to prepare
Put the repository owner and reviewer in touch before the audit starts. Agree whether your immediate concern is a specific change, the default branch, or a shared component. If the repository has generated code or vendor dependencies, identify which code your team maintains so reviewers can prioritize the findings that they can act on.
- A GitHub repository you are authorized to connect
- The pull request or default branch that matches your review goal
- A maintainer who can explain how the relevant code is deployed
- An owner who can review fixes and add regression tests
Where static review ends
A whole-repository audit runs static rules and working-tree secret detection. AI review applies to pull request diffs, while AI triage explains findings from either scope. Pentoma Code connects to GitHub and posts a summary for pull requests. Your engineering workflow still owns approval, patch creation, and whether a change can merge.
Use static and runtime testing for different questions. Source analysis can point you to the implementation that needs attention. A penetration test can establish what is reachable in a running app or API within its own scope. When a reported weakness depends on a deployed configuration or a role boundary, bring the exact revision and deployment context into the follow-up.
Questions
Can we audit a specific pull request?
Yes. Pentoma Code audits the diff and posts one summary comment with the top findings and a link. Use a default-branch or manual audit when you need repository scope.
Which repository providers connect?
Pentoma Code connects through a GitHub App. GitLab and Bitbucket are outside the current integration.
Will the audit find secrets removed in an older commit?
Secret detection covers the working tree. Use a separate history review if your concern is a credential that may still appear in older commits.
Does a static finding prove a live weakness?
A static finding identifies the affected code and explains why it matters. You may need runtime evidence to establish reachability and impact in a deployed environment.
What happens when part of the code can’t be checked?
The audit records skipped or limited checks and marks partial coverage. Review those details before drawing conclusions about the parts of the repository your team cares about.
Can Pentoma block the merge or open a fix?
The GitHub App posts a summary comment and links to the findings. Your team decides whether to open a fix and applies its usual merge controls.