An agent that can see a
finding still has to know
whether that finding is a
gate. Advisory and blocking
are different jobs. Mixing
them is how a green pull
request hides a forbidden
package, or how a suggestion
becomes a rewrite nobody
asked for.
License compliance is a gate
only when a ruleset is in
Active mode and requires
license compliance results
before merging. The scope is
the diff: new or changed
dependencies against the base
branch, including transitive
ones the dependency graph
already knows. Evaluate mode
annotates and does not block,
unless a separate branch
protection rule requires those
comments to be resolved. The
agent does not get to approve
the exception. That closure
request goes to the license
manager. A person decides
whether this repository may
take this license. That is
intent. The repetitive job is
the query, and the removal
when the policy already says
no.
AI Scan is the other half of
the same split. It can explain
a risk in a Dockerfile, a
shell script, or a Terraform
file that CodeQL does not
cover, and it can suggest a
fix. It will not fail the code
scanning check, and a ruleset
cannot treat it as a required
status. Fork pull requests and
Dependabot pull requests are
outside its run. Spending AI
credits to chase a suggestion
after the named check passed
is not review. It is scope
creep with a badge.
The stop condition is the
named gate on this diff. If
the Active license check
passes, or this pull request
did not change a manifest, and
any AI Scan findings are
either fixed, explicitly
accepted as non-blocking, or
out of scope, stop. Do not
hunt every license already in
the repository. Do not expand
a suggested autofix into a new
base image, a new entrypoint,
and a new healthcheck because
the suggestion felt
incomplete. The human job that
remains is judgment: whether
this dependency should exist,
and whether this advisory risk
is worth a change. The agent
job is to ask the policy
before the package is in the
diff, and to stop when the
gate you named has passed.
-
Before an agent adds or
upgrades a dependency, query
whether the package complies
with the enterprise license
policy. A remembered license
name is not the query.
-
Read the ruleset mode.
Active blocks. Evaluate
annotates. A green merge
under Evaluate is not
enforcement.
-
Include transitive
dependencies. The graph
already does. The model’s
“MIT” memory does not.
-
Do not treat an AI Scan
finding as a failed check.
If you need a gate, name one
that can fail: CodeQL, or an
Active license ruleset.
-
A suggested autofix is a
proposal. Read it. It is not
a merge requirement, and it
does not run on fork or
Dependabot pull requests.
-
Stop when the named gate on
this diff passes. More
looking is how a dependency
bump becomes a rewrite.
Exceptions stay with the
license manager.
Ask the policy before the
package lands in the diff.
Stop when the gate you named
has already answered.