
I Tried Out Amazon Inspector's New Feature "Runtime Reachability"
This page has been translated by machine translation. View original
Introduction
On November 23, 2026, Amazon Inspector announced runtime reachability.
Each vulnerable package in a finding is labeled REACHABLE, NOT_REACHABLE, or UNKNOWN, giving you input for deciding remediation priority.
This article introduces the fields added to a finding, and the results of trying the determination on an ECR image and an EC2 instance.
Test environment
- Region: Tokyo (ap-northeast-1)
- AWS CLI: 2.42.2
- ECR scan settings: enhanced scanning enabled, continuous scanning for all repositories
Finding fields
The determination results go into two fields, runtimeReachability and runtimeReachabilityReason. They are attached to each package in findings[].packageVulnerabilityDetails.vulnerablePackages[]. The following shows one element of that array.
{
"name": "next",
"version": "16.4.0",
"packageManager": "NODE",
"filePath": "/var/task/node_modules/next/package.json",
"runtimeReachability": "REACHABLE",
"runtimeReachabilityReason": "PACKAGE_IN_DOCKERFILE_WORKLOAD_PATH",
"purl": "pkg:npm/next@16.4.0"
}
There are four values of runtimeReachabilityReason (hereafter, reason). The correspondence with the runtimeReachability values and targets is as follows.
| reason | runtimeReachability | Target | Basis for determination |
|---|---|---|---|
| PACKAGE_IN_DOCKERFILE_WORKLOAD_PATH | REACHABLE | ECR image | The package's file path is inside the directory of WORKDIR, ENTRYPOINT, or CMD |
| PACKAGE_NOT_IN_DOCKERFILE_WORKLOAD_PATH | NOT_REACHABLE | ECR image | Outside the directories above |
| PROCESS_OBSERVED_IN_EC2_RUNTIME | REACHABLE | EC2 | The package was running as a process or service at scan time |
| PROCESS_NOT_OBSERVED_IN_EC2_RUNTIME | NOT_REACHABLE | EC2 | It was not running at scan time |
Packages that cannot be determined become UNKNOWN, and no reason is attached.
The fields are attached to findings for ECR container images (AWS_ECR_CONTAINER_IMAGE) and EC2 instances (AWS_EC2_INSTANCE). They are not attached to findings for Lambda functions and other resources. New findings have the fields from the start, and existing findings get them gradually. If an existing finding has no fields, it does not mean it was determined to be NOT_REACHABLE; the fields have simply not been attached yet.
ECR image
I built an image with vulnerable packages placed both inside and outside WORKDIR, pushed it to ECR, and checked whether Inspector's determination differed.
Creating the Dockerfile and image
The base image is node:22-alpine. minimist 1.2.0 is placed under /app, which is WORKDIR, and lodash 4.17.15 is placed in /opt/other. Save the following two files in the same directory with the names Dockerfile and index.js.
FROM node:22-alpine
# Place the vulnerable lodash outside WORKDIR
RUN mkdir -p /opt/other && cd /opt/other && npm install lodash@4.17.15 --no-audit --no-fund
# Place the vulnerable minimist under WORKDIR
WORKDIR /app
COPY index.js .
RUN npm install minimist@1.2.0 --no-audit --no-fund
CMD ["node", "index.js"]
setInterval(() => {}, 1000);
I created the repository, built the image, and pushed it.
aws ecr create-repository --repository-name reachability-verify-1125
docker build -q -t <ACCOUNT_ID>.dkr.ecr.ap-northeast-1.amazonaws.com/reachability-verify-1125:workdir .
docker push <ACCOUNT_ID>.dkr.ecr.ap-northeast-1.amazonaws.com/reachability-verify-1125:workdir
The host used for the build is arm64. I used Docker 29.10.0 (containerd image store).
Determination inside and outside WORKDIR
I retrieved the scan results with Inspector's list-findings. This time, findings were created about 20 seconds after the push.
The tag points to an image index, and findings are attached to the digest of the linux manifest within it. Specify this digest in the ecrImageHash filter. I extracted the digest with the following command.
aws ecr batch-get-image --repository-name reachability-verify-1125 --image-ids imageTag=workdir --query 'images[0].imageManifest' --output text | jq -r '.manifests[] | select(.platform.os=="linux") | .digest'
I narrowed down the findings with the extracted digest and output the minimist and lodash determinations as tab-separated values.
aws inspector2 list-findings \
--filter-criteria '{"ecrImageRepositoryName":[{"comparison":"EQUALS","value":"reachability-verify-1125"}],"ecrImageHash":[{"comparison":"EQUALS","value":"<digest>"}]}' \
--output json \
| jq -r '.findings[] | .title as $t | .packageVulnerabilityDetails.vulnerablePackages[] | select(.name=="minimist" or .name=="lodash") | [$t, .name, .version, .filePath, .runtimeReachability, .runtimeReachabilityReason] | @tsv' | sort -u
The output is 8 lines. One line each for lodash and minimist is shown.
CVE-2020-28500 - lodash lodash 4.17.15 /opt/other/node_modules/lodash/package.json NOT_REACHABLE PACKAGE_NOT_IN_DOCKERFILE_WORKLOAD_PATH
CVE-2020-7598 - minimist minimist 1.2.0 /app/node_modules/minimist/package.json REACHABLE PACKAGE_IN_DOCKERFILE_WORKLOAD_PATH
Specifying WORKDIR, ENTRYPOINT, and CMD
I built images with the instructions that determine the directory used for the determination in three patterns: "WORKDIR and CMD", "ENTRYPOINT only", and "CMD only", and checked the determination with the same procedure. In every image, lodash is placed in /opt/other.
| Image | Dockerfile specification | minimist location | minimist determination | lodash determination |
|---|---|---|---|---|
| workdir | WORKDIR /app and CMD ["node", "index.js"] | /app/node_modules/minimist | REACHABLE | NOT_REACHABLE |
| entrypoint | ENTRYPOINT ["node", "/srv/app/index.js"] (no WORKDIR) | /srv/app/node_modules/minimist | REACHABLE | NOT_REACHABLE |
| cmd | CMD ["node", "/srv/app/index.js"] (no WORKDIR or ENTRYPOINT) | /srv/app/node_modules/minimist | REACHABLE | NOT_REACHABLE |
Dockerfiles for entrypoint and cmd
entrypoint:
FROM node:22-alpine
RUN mkdir -p /opt/other && cd /opt/other && npm install lodash@4.17.15 --no-audit --no-fund
# Do not specify WORKDIR; place minimist only in the ENTRYPOINT path (/srv/app)
COPY index.js /srv/app/index.js
RUN cd /srv/app && npm install minimist@1.2.0 --no-audit --no-fund
ENTRYPOINT ["node", "/srv/app/index.js"]
cmd:
FROM node:22-alpine
RUN mkdir -p /opt/other && cd /opt/other && npm install lodash@4.17.15 --no-audit --no-fund
# Specify neither WORKDIR nor ENTRYPOINT; place minimist only in the CMD path (/srv/app)
COPY index.js /srv/app/index.js
RUN cd /srv/app && npm install minimist@1.2.0 --no-audit --no-fund
CMD ["node", "/srv/app/index.js"]
EC2 instance
To use this feature with EC2 findings, the agent-based scanning Inspector VM Scanner is required. The determination looks at whether the package was running as a process or service at scan time. Inspector resets the value at every scan, so the value for the same package may change between REACHABLE and NOT_REACHABLE.
Preparing the instance
The configuration of the test instance is as follows.
- Instance type: t4g.small
- OS: Amazon Linux 2023 (AMI released as 2023.1.20230825)
- Metadata: IMDSv2 required
- Security group: no inbound rules
- IAM: an instance profile associated with a role with AmazonSSMManagedInstanceCore attached
I used an old AMI in order to install vulnerable versions of httpd, nginx, and PHP.
Launch the instance and confirm SSM connectivity. Then, install httpd, nginx, and PHP with Run Command and start httpd.
aws ssm send-command --instance-ids <instance-id> --document-name AWS-RunShellScript \
--parameters 'commands=["dnf -y install httpd nginx php8.1-cli","systemctl enable --now httpd","rpm -q httpd nginx php8.1-cli","systemctl is-active httpd"]'
Afterward, enable EC2 scanning with aws inspector2 enable --resource-types EC2. This is a per-Region setting of the account. Once enabled, inspector-vm-scanner 1.0.14-1 was installed on the instance via SSM, and findings were created about three and a half minutes later.
Determination by the presence of a process
The instance had 4,200 findings, and counting the vulnerable packages they contain cumulatively gives 9,238. 205 were REACHABLE and 9,033 were NOT_REACHABLE. 10 kinds of packages became REACHABLE: amazon-ssm-agent, httpd-core, libstoragemgmt, openssh-server, sssd-common, systemd, systemd-networkd, systemd-resolved, systemd-udev, and util-linux-core.
The five glibc-family packages (glibc, glibc-all-langpacks, glibc-common, glibc-gconv-extra, glibc-locale-source) and openssl-libs were also NOT_REACHABLE. kernel and kernel-tools each had 3,259 entries, all NOT_REACHABLE. These two account for about 70% of the 9,033 NOT_REACHABLE entries.
The determinations for httpd, nginx, and PHP are as follows.
| Package | Version | State | Determination |
|---|---|---|---|
| httpd-core | 2.4.56 | httpd started | REACHABLE |
| httpd, httpd-tools, httpd-filesystem | 2.4.56 | httpd started (component packages other than httpd-core) | NOT_REACHABLE |
| nginx, nginx-core, nginx-filesystem | 1.24.0 | Installed only | NOT_REACHABLE |
| php8.1-cli, php8.1-common | 8.1.22 | Installed only | NOT_REACHABLE |
The determination is per package. Of the packages that make up httpd, only httpd-core became REACHABLE.
I retrieved the httpd-core finding by specifying the name and runtimeReachability in the vulnerablePackages filter.
aws inspector2 list-findings --max-results 1 \
--filter-criteria '{"resourceId":[{"comparison":"EQUALS","value":"<instance-id>"}],"vulnerablePackages":[{"name":{"comparison":"EQUALS","value":"httpd-core"},"runtimeReachability":{"comparison":"EQUALS","value":"REACHABLE"}}]}' \
--query 'findings[].{title:title,severity:severity,resourceType:resources[0].type,pkgs:packageVulnerabilityDetails.vulnerablePackages[?name==`httpd-core`].{name:name,version:version,runtimeReachability:runtimeReachability,runtimeReachabilityReason:runtimeReachabilityReason}}'
[
{
"title": "CVE-2026-63686 - httpd, httpd-core and 4 more",
"severity": "MEDIUM",
"resourceType": "AWS_EC2_INSTANCE",
"pkgs": [
{
"name": "httpd-core",
"version": "2.4.56",
"runtimeReachability": "REACHABLE",
"runtimeReachabilityReason": "PROCESS_OBSERVED_IN_EC2_RUNTIME"
}
]
}
]
Filtering
You can filter the list of findings with the vulnerablePackages filter of list-findings. The fields to specify are runtimeReachability or runtimeReachabilityReason.
Number of ECR image findings
In the five existing repositories of the test account, I counted the ACTIVE findings of ECR images by runtimeReachability. The results of list-findings are returned one page at a time, and the count from --query is also output per page, so I summed them with awk. Save the following script as count-reachability.sh and run it.
# Count ACTIVE ECR findings by runtimeReachability
for v in ALL REACHABLE NOT_REACHABLE UNKNOWN; do
if [ "$v" = ALL ]; then
F='{"resourceType":[{"comparison":"EQUALS","value":"AWS_ECR_CONTAINER_IMAGE"}],"findingStatus":[{"comparison":"EQUALS","value":"ACTIVE"}]}'
else
F='{"resourceType":[{"comparison":"EQUALS","value":"AWS_ECR_CONTAINER_IMAGE"}],"findingStatus":[{"comparison":"EQUALS","value":"ACTIVE"}],"vulnerablePackages":[{"runtimeReachability":{"comparison":"EQUALS","value":"'$v'"}}]}'
fi
n=$(aws inspector2 list-findings --filter-criteria "$F" --query 'length(findings)' --output text | awk '{s+=$1} END{print s+0}')
echo "$v=$n"
done
ALL=824
REACHABLE=77
NOT_REACHABLE=747
UNKNOWN=0
Filtering by REACHABLE reduced 824 findings to 77. These 77 are findings in which at least one package is REACHABLE.
Suppression rules
If you want to focus on REACHABLE findings, use a suppression rule of runtimeReachability EQUALS NOT_REACHABLE. According to the documentation, a suppression rule evaluates all packages in a finding together. This rule suppresses findings in which all packages are NOT_REACHABLE. Suppressed findings no longer appear in the console's default list.
Summary
I checked the behavior of Amazon Inspector's runtime reachability on an ECR image and an EC2 instance.
Inspector also detects vulnerabilities in packages that are merely installed and not used. With runtime reachability, you get input for judging the degree of risk, namely whether a package is used by the application. If you have adopted Inspector but there are too many detections and your suppression rules can't keep up, please make use of it.
However, please note that even for NOT_REACHABLE, potential risk remains.
