Sign inSign up

sonatype/agp

Verified Publisher

By Sonatype

Updated about 11 hours ago

Image
0

10K+

sonatype/agp repository overview

Sonatype AgentP (AGP)

Sonatype AgentP (AGP) is Sonatype's agentic remediation CLI, packaged as a container image for use in CI and automation. AGP scans dependency manifests, identifies vulnerable and outdated components, and opens pull requests that apply upgrades — optionally gated on your own build and test commands.

Quick reference

Images

AGP is distributed as three chained images. The runtime image most consumers want is sonatype/agp; the other two are the OSS toolchain and OS layers it is built from, published separately for licensing transparency.

  • sonatype/agp — the runtime image. Inherits sonatype/agp-build-tools and adds the AGP CLI and entrypoint scripts. Use this image in CI systems and the Sonatype GitHub Action.
  • sonatype/agp-build-tools — the polyglot build toolchain layer. Inherits sonatype/agp-base and adds Node.js 22, OpenJDK 17/21/25, Python with poetry and uv, Maven, Gradle, Go, bun, Yarn 4, pnpm 11, the .NET SDK 10, Claude Code, npm-run-all2, and their transitive dependencies. Published for licensing transparency; not intended for direct use — use sonatype/agp.
  • sonatype/agp-base — the Alpine 3.22 baseline with the non-root agp user (uid/gid 10000), pinned OpenSSL, and the minimal system utilities the chain relies on. Published for licensing transparency; not intended for direct use — use sonatype/agp.

Supported tags

TagDescription
latestMost recent release of sonatype/agp. Only sonatype/agp carries latest.
<version>A specific published release (e.g. 1.0.0), available on each of the three images.

Usage

sonatype/agp is designed to run inside a GitHub Actions workflow via the sonatype/agp-action — the action sets up the workspace, credentials, and INPUT_* environment the CLI expects, then invokes agp against your checkout. See https://help.sonatype.com/en/sonatype-guide.html for setup.

The entrypoint dispatches on INPUT_MODE against an explicit allowlist: full/security/unset run agp run . --source GITHUB_ACTION from $INPUT_WORKING_DIRECTORY (falling back to /github/workspace, which is what most callers get), heal runs agp heal $INPUT_REPO_ID, and resolve-failure runs agp resolve-failure $INPUT_REPO_ID. Any other value exits non-zero rather than falling back to a full upgrade sweep. Overriding INPUT_WORKING_DIRECTORY is how Sonatype's Jenkins plugin runs AGP against a subdirectory of a monorepo checkout. Either way, docker run sonatype/agp:latest invoked directly (with no workspace mount or credentials) will fail. To exercise the binary itself outside a workflow (e.g. to check the version), override the entrypoint:

docker run --rm --entrypoint agp sonatype/agp:latest --version

Environment

VariableAvailable onDescription
JAVA_HOMEagp, agp-build-toolsDefault /usr/lib/jvm/java-21-openjdk. Alternates: JAVA_17_HOME, JAVA_25_HOME.
GIT_AUTHOR_NAME / GIT_AUTHOR_EMAILall threeOverride the default commit identity. The default (Agentic Patches <[email protected]>) is configured on the agp user only; a process running as root has no default.
GIT_COMMITTER_NAME / GIT_COMMITTER_EMAILall threeSame, for committer identity.

The sonatype/agp runtime image sets its working directory to /github/workspace; the intermediate images declare no WORKDIR and fall back to /.

On sonatype/agp, the entrypoint (/entrypoint.sh) starts as root to chown the workspace, then drops to the non-root agp user (uid/gid 10000) via su-exec before executing the AGP CLI. Overriding the entrypoint or running the intermediate images directly bypasses this switch and leaves the process running as root.

Security

sonatype/agp includes a C compiler toolchain (build-base and pkgconfig, inherited from sonatype/agp-build-tools) to support Go packages that link a native C library via CGO — e.g. go-sqlite3 — which would otherwise fail to build during a dependency upgrade.

Report suspected vulnerabilities through https://help.sonatype.com.

License

Use of these images is subject to Sonatype's terms and the third-party attributions listed at https://links.sonatype.com/products/clm/attributions.

Tag summary

Content type

Image

Digest

sha256:e716fb9dd

Size

1.2 GB

Last updated

about 11 hours ago

docker pull sonatype/agp

This week's pulls

Pulls:

1,925

Last week

Bitnami