Code security scanning,
filed against the control it breaks.
The SDK runs in your pipeline on every push: static analysis, dependency audit, infrastructure-as-code and secret scanning, plus control checks that read how your routes, sessions and sign-in actually behave. Each finding carries the framework reference an auditor will ask about, not just a rule ID.
What it does
- Runs in your CI, a pre-push hook or locally; nothing leaves your environment except results
- Built-in static rules with file and line, plus Semgrep and Trivy when they are installed
- Dependency audit for JavaScript and TypeScript projects; other ecosystems through Trivy
- IaC checks per resource: Terraform, CloudFormation, Kubernetes, Docker Compose, Dockerfiles and CI workflows
- Behaviour checks for Express, Fastify, NestJS and Next.js: authentication per route, rate limiting, input validation
- Sign-in checks: JWT algorithm and lifetime, MFA, lockout and password policy
- Every push recorded with commit, branch and author
What is code security scanning for compliance?
Code security scanning for compliance means running static analysis, dependency and secret scanning on every change and keeping the results as evidence for the controls that ask for secure development. SOC 2 CC8.1, ISO 27001 Annex A 8.25 to 8.29 and DPDP's reasonable security safeguards all expect it to happen continuously, not once before an audit.
The difference from a standalone scanner is where the finding goes. A scanner hands you a list sorted by severity. Here each finding is a control result, so a hardcoded secret fails the access-control control in every framework you run and shows on the readiness score the same hour.
How does code security scanning work in TryTrustable?
- Install the SDK in the pipelineAdd the SDK to your repository and run
trytrustable syncfrom CI, a pre-push hook or a developer's machine. The developer docs include a generated CI workflow, so the first run needs no hand-written YAML. - Static rules run firstThe SDK's own rules read the code and report each match with the file and line. They cover patterns such as hardcoded credentials, weak cryptography and unsafe request handling, and they run with no other tool installed.
- Semgrep and Trivy join if presentWhen Semgrep is on the runner it runs with
--config auto; when Trivy is present it scans the file system for vulnerable dependencies, misconfiguration and secrets. If either is missing, its checks are recorded as skipped, with the reason, and never as passed. - Control checks read behaviour, not just textAbout 80 control checks look at how the application is put together: whether each Express, Fastify, NestJS or Next.js route requires authentication, whether rate limiting and input validation are in place, how JWTs are signed and how long they live, and whether MFA, lockout and password rules exist.
- Results become control resultsEach finding is sent with its check, status, file, line and the control it relates to, and the push is recorded with commit, branch and author. The same result then counts in every framework that maps to that control.
- Exceptions stay visibleA finding can be accepted only with an inline comment that names the check and gives a reason of at least ten characters. It is then reported as a justified exception, which a reviewer sees in the diff and an auditor sees in the evidence.
Which SOC 2 and ISO 27001 controls does code scanning evidence?
Code scanning is evidence for the secure development, change management and vulnerability controls. The table shows the common reading; your auditor decides what a criterion needs.
| Requirement | What it asks | What code scanning provides as evidence |
|---|---|---|
| SOC 2 CC8.1 | Changes are authorised, designed, tested and approved before release | A dated scan result per commit and branch, and a failed check on the pull request when a finding crosses the threshold |
| SOC 2 CC7.1 | Detect configuration changes and newly discovered vulnerabilities | Dependency and IaC findings on every push, not only before an audit |
| SOC 2 CC6.1 | Logical access controls protect information assets | Route-level authentication checks, JWT and session settings, MFA and lockout checks |
| SOC 2 CC6.8 | Prevent or detect unauthorised or malicious software | Dependency audit and secret scanning results for each build |
| ISO/IEC 27001 A.8.25 | Secure development life cycle | A scan that runs as part of every change, with its results kept |
| ISO/IEC 27001 A.8.28 | Secure coding | Static analysis findings with file and line, and the exceptions accepted with reasons |
| ISO/IEC 27001 A.8.29 | Security testing in development and acceptance | CI results that gate merges, including skipped checks marked as skipped |
| ISO/IEC 27001 A.8.8 | Management of technical vulnerabilities | Vulnerable dependency findings, which then follow the remediation SLAs |
| ISO/IEC 27001 A.8.9 | Configuration management | IaC findings per resource in Terraform, CloudFormation, Kubernetes, Compose and Dockerfiles |
| DPDP Act s.8(5), Rules 2025 Rule 6 | Reasonable security safeguards to prevent a personal data breach | A continuous record that the code handling personal data is tested for known weaknesses |
Mappings are the common reading of each criterion, not an AICPA or ISO table. Auditors differ; agree the mapping with yours before you rely on it.
Why does a skipped check not count as passed?
Because a scanner that is not installed, times out or crashes usually exits cleanly, and a clean exit read as a pass is the most flattering wrong answer a pipeline can give. When Semgrep or Trivy is missing, the SDK records the check as skipped and says so; it never writes a pass for a test that did not run.
Suppressions follow the same rule. A finding can be accepted only with an inline comment that names the check and gives a reason, so every exception is visible in the code review and in the evidence.
Which languages does it cover?
The built-in rules and behaviour checks are strongest on JavaScript and TypeScript, including the Express, Fastify, NestJS and Next.js route checks. Other languages are covered through Semgrep and Trivy when they are installed in the pipeline. Infrastructure-as-code checks are language-independent.
What is the difference between SAST, SCA, IaC and secret scanning?
SAST reads your own source code for unsafe patterns, SCA checks the open-source packages you depend on against known vulnerabilities, IaC scanning checks infrastructure definitions for insecure settings, and secret scanning looks for credentials committed to the repository. Each finds a different class of problem, and a security programme that an auditor accepts usually needs all four.
SAST (static application security testing) catches the mistakes your team writes: a SQL query built from a string, a hardcoded API key, a weak hash. SCA (software composition analysis) catches the mistakes other people wrote that you shipped: most of a modern JavaScript application is dependencies, so a single vulnerable package can matter more than your own code. IaC scanning catches an S3 bucket left public or a Kubernetes pod running as root before it is deployed. Secret scanning catches the credential that should never have been committed, which is often the shortest path into production.
None of them proves an application is secure. They prove that known classes of weakness are looked for on every change, which is what SOC 2 CC8.1 and ISO 27001 A.8.25 to A.8.29 actually ask.
Why check how routes behave, not only what the code says?
Because the most common serious finding in a web application is a route that should require sign-in and does not, and a pattern-matching rule cannot see that. The SDK reads the route table of Express, Fastify, NestJS and Next.js applications and reports which routes have authentication, rate limiting and input validation, and which do not.
That turns an auditor's question, "how do you know every endpoint is protected?", into a list with a date on it. It also catches the regression that code review misses: a new endpoint added in a hurry, outside the middleware that protects the rest.
The same approach applies to sign-in. The checks read how JWTs are signed and how long they last, whether MFA exists, whether accounts lock after repeated failures and what the password rules are, so the access control evidence comes from the code that enforces it rather than from a policy document.
How should exceptions to a security finding be handled?
An exception should name the finding, give a reason, and be visible to a reviewer; an exception that does none of these is a permanent hole that looks the same as a fix. In TryTrustable an exception is an inline comment, // trytrustable-ignore <check-id>: <reason>, and a reason shorter than ten characters is rejected.
Putting the exception in the code, next to the line it excuses, means it goes through the same pull request review as any other change. The reviewer sees who added it and why. The evidence then records the finding as a justified exception, so the auditor sees an accepted risk with a reason, not a silent pass.
Review exceptions on a schedule. A reason that was true when a dependency had no fix may stop being true when the fix ships; the record of when each exception was added is what makes that review possible.
Which pipelines and languages does it work with?
The SDK runs anywhere Node.js runs, so it works in GitHub Actions, GitLab CI and any other CI that can run a command, as well as in a pre-push hook or on a laptop. The built-in rules, dependency audit and route checks are strongest on JavaScript and TypeScript.
For other languages, coverage comes from Semgrep and Trivy when they are installed on the runner. IaC checks do not depend on the application language. If your stack is mostly Go, Java or Python, install Semgrep and Trivy in the pipeline so the scan is not limited to infrastructure and secrets.
What will an auditor ask for about secure development?
- Your secure development policy, and evidence that it was followed for changes sampled from the audit period
- Scan results for specific commits or releases the auditor picks, with dates
- Proof that a failing scan blocks a merge, usually the branch protection setting plus an example of a blocked pull request
- Every exception granted during the period, with who granted it and why
- How a skipped or failed scanner is detected, so a broken tool does not read as a clean result
- How dependency vulnerabilities found by the scan were tracked to remediation
What code security scanning does not do
- It does not send your source code to TryTrustable; only results leave the pipeline
- It does not test a running application; that is web security testing
- It does not fix code or open pull requests for you
- Its built-in rules are strongest on JavaScript and TypeScript; other languages rely on Semgrep and Trivy being installed
- It does not replace code review or a penetration test by a human tester
Where this sits
Every result here is a control result on the same graph as the rest of the platform, so it reaches each framework that asks for it without being gathered again. Coverage lists the regimes.
Related reading: compliance as code in CI, the SDK and CI gate and vulnerability management.
The things people ask us
Does the SDK send our source code to TryTrustable?
No. Analysis runs in your pipeline and only results are sent: the check, its status, the file and line, and the control it relates to.
Do we need Semgrep or Trivy?
No, but they widen coverage. The SDK has its own rules and runs Semgrep and Trivy when it finds them installed. If they are not installed, those checks are reported as skipped rather than passed.
Can a finding block a merge?
Yes. The CI gate fails the pull request with the control reference and the fix. It can be set to warn while a team adopts it.
How do we accept a false positive?
With an inline comment naming the check and giving a reason of at least ten characters. The exception is then visible in review and recorded as a justified exception, not as a fix.
What is the difference between SAST and SCA?
SAST analyses your own source code for unsafe patterns. SCA checks the third-party packages you depend on against known vulnerabilities. The SDK does both: its own static rules plus a dependency audit, with Semgrep and Trivy adding coverage when installed.
Does it work with GitLab CI?
Yes. The SDK is a command-line tool that runs in any CI that can run Node.js, including GitHub Actions and GitLab CI, and in a pre-push hook.
Which infrastructure-as-code formats are checked?
Terraform, CloudFormation, Kubernetes manifests, Docker Compose files, Dockerfiles and CI workflow files, with findings reported per resource.
Is code scanning required for SOC 2?
SOC 2 does not name a tool, but CC8.1 and CC7.1 expect changes to be tested and vulnerabilities to be detected. Automated scanning on every change is the usual way to evidence both.
How do scan results reach our compliance score?
Each finding is a control result. A failing check counts against the control it relates to in every framework you have enabled, so readiness reflects the code as it is now.
Your next audit could be a link.
Thirty minutes. We connect one cloud account live and show you real evidence landing in the ledger before the call ends.