Malware check
The malware check fires when a governed agent installs a package. The check looks up the package in the Endor Labs malware feed, the same intelligence that powers malicious package detection and Package Firewall. Only confirmed malware triggers the policy. Contested records and records under review do not. The check parses the packages out of the install command the agent runs. It recognizes the following package managers:- npm:
npm,pnpm,yarn,bun,npx, andbunx. - PyPI:
pip,python -m pip,poetry,pipenv,uv, anduvx. - Go:
go install. - NuGet:
dotnet add package,nuget, andpaket. - Packagist:
composer. - Crates:
cargo. - RubyGems:
gemandbundle. - OS package managers:
apk,apt,yum,dnf, andzypper.
sudo and env, and inline shells such as bash -c "npm install …".
A malware violation carries the evidence your team needs to respond:
- The package name, version, and ecosystem from the install. An unpinned install shows an empty version.
- A summary of the malware report and the reasons the feed flagged the package.
- The feed source that flagged the package.
ecosystems list through the REST API. The valid tokens are npm, pypi, go, nuget, packagist, cargo, gem, apk, debian, and rpm, and Endor Labs rejects a policy that carries any other value. The policy form does not expose secure coding fields yet.
The out-of-the-box policy Malware: block installs of known-malicious packages is disabled by default. Enable it, or create your own malware policy, to turn the check on.
The following example creates a malware policy scoped to npm and PyPI installs with endorctl. Replace <namespace> with the namespace that owns your Coding Agent Governance policies. Leave ecosystems empty to check every ecosystem.
Secrets check
The secrets check scans content the agent touches for secrets, such as cloud access keys, provider tokens, and private keys. By default a policy scans the content of file writes and edits. AddFILE_OPERATION_READ to the policy’s file_operations list to also scan the files the agent reads. Read scanning is opt-in because it reads each file from disk. Detection uses the Endor Labs secret rules library, the same rules as secrets scanning. See Secret detection rules for the full library.
The scan runs on the developer’s machine, and the scanned content never leaves it. A secrets violation carries:
- The rule that fired, such as
aws-access-tokenorgithub-pat, with its human-readable name. - The line and column where the secret starts.
- A fingerprint that groups repeat findings of the same secret.
REDACTED. When a permitted operation runs, the follow-up event records that the operation happened without carrying the file content.
Two more policy fields shape the check through the REST API:
include_file_patternslimits scanning to matching paths, andexclude_file_patternsskips paths such as test fixtures or vendored directories. Exclusions apply after inclusions. An empty configuration scans every file the event covers.include_rule_idslimits the policy to specific detection rules, andexclude_rule_idsmutes rules whose matches are false positives in your codebase. Both match rule IDs such asaws-access-tokenexactly. Exclusions apply after inclusions.
secrets_check activity in place of malware_check.
Two out-of-the-box secrets policies are disabled by default: Secrets: block writes that introduce a credential and Secrets: ask before reading a file that holds a credential. Enable them, or create your own secrets policy, to turn the check on.
Actions
Secure coding checks use the same actions as every other Coding Agent Governance policy: Block stops the action, Alert records it, and Ask Permission pauses for the developer. Violations appear under Policy Violations next to the rest of your governance activity. See Actions for what the developer and your security team see for each action.How the checks fit with other Endor Labs protection
Endor Labs catches malicious packages and secrets at more than one layer, and each layer covers a different point in the workflow:- Secure coding checks act in the agent loop, at the moment an agent installs a package or touches a secret.
- Package Firewall protects the registry path for every install in your organization, whether an agent or a person runs it.
- Secrets scanning finds secrets already committed to your repositories and pull requests.
Limitations
Be aware of the following limitations:- Checks run for supported agents on machines with hooks deployed.
- The secrets check inspects content the agent touches in a session. It is not a repository-wide scan. Use secrets scanning for full-repository coverage.
- Like all Coding Agent Governance controls, these checks are guardrails for agent behavior, not a security boundary. See What Coding Agent Governance is (and isn’t).