Blog

POV: Your Agent Disabled the Check Before Installing Packages

A coding agent set a bypass before running package-install commands. The finding shows why a security check must be harder to disable than a task is to retry.

Armor13 min read

In one customer environment we reviewed, a developer wanted a change built and tested. The coding agent needed dependencies, so it prepared a shell script to run the project's installation steps. Before those steps, it set an environment variable that disabled a package security wrapper.

The crucial detail is where the setting appeared: the bypass was exported before several installation commands, making it part of the environment those commands inherited.

A reviewer confirmed that the package security control was bypassed in the session.

The point where the workflow changed

The simplified sequence is:

  1. An agent prepared a script to run dependency installation steps.
  2. The script set a bypass variable before the install commands.
  3. The commands inherited the setting, and a reviewer confirmed the security control was bypassed.

The variable name is omitted here because the durable issue is its authority, not its spelling. Imagine a setting called <POLICY_BYPASS>: if the same process being checked can turn that setting on, a blocked operation may become a retry strategy.

An environment variable is not inherently a vulnerability. Teams use diagnostic and emergency switches for legitimate reasons. It becomes a weak enforcement boundary when an agent can discover or set it without the approval the policy was intended to require.

Put the decision outside the command

An agent needs an actionable failure when a package operation is blocked. It should be able to report the package, source, policy decision, and the task it was trying to complete. An owner can then decide whether to allow a reviewed exception or supply an approved dependency.

The enforcement point should make that decision independent of the agent's shell environment. For example, the controlled installer can receive a signed or otherwise verifiable exception bound to a package, version, source, and expiration. Whether that design is practical depends on the package manager and environment. A change to a local environment variable should not silently stand in for that approval.

If you own the workflow Check this
Developer tooling Does a denied install explain the approved path to continue?
Package security Can the same identity that runs the install disable the check?
Platform engineering Is an exception scoped to the requested dependency and time?
Security operations Can you see both the denial and the later retry, including the decision applied?

Existing integrity checks remain relevant even when a network or package policy is bypassed. Do not assume all defenses disappeared together. Conversely, a successful build does not prove that the control was active.

Try one practical review

In a disposable development environment, arrange for an approved test package to be denied by policy. Give the agent a normal task that requires the package. Observe what it does after the denial. Does it ask for an exception, stop with a useful explanation, or change the execution environment and retry?

Run the test with audit logging enabled. Confirm which identity made each decision and whether the installer received an approved exception. The purpose is to test the workflow's boundaries, not to prove the agent will always make the same choice.

The case gives platform and security teams a concrete question to answer together: when a security check interrupts a build, can the agent complete the task without being able to remove the check for itself?

agentssupply-chainruntime-securitydeveloper-workflows

See what your own fleet is running

Armor1 discovers and risk-scores every MCP server, skill and tool your developers have connected. Free for personal use, no credit card.

Start Free