Skip to content
Back to skills

Cis Docker V170 4.7

ASecurity

Ensure update instructions are not used alone in Dockerfiles

  • 2,182 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 3, 2026
securitygobashdockerdatabase

Security analysis

A100/100

Scanned September 3, 2026

npx -y skills add CyberStrikeus/CyberStrike --skill cis-docker-v170-4.7 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cis Docker V170 4.7?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cis Docker V170 4.7
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/cyberstrikeus-cis-docker-v170-4-7/badge)](https://www.skillsdirectory.com/skills/cyberstrikeus-cis-docker-v170-4-7)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cis-docker-v170-4.7
description: "Ensure update instructions are not used alone in Dockerfiles"
category: cis-docker
version: "1.7.0"
author: cyberstrike-official
tags: [cis, docker, images, configuration, caching]
cis_id: "4.7"
cis_benchmark: "CIS Docker Benchmark v1.7.0"
tech_stack: [docker]
cwe_ids: []
chains_with: []
prerequisites: []
severity_boost: {}
---

# CIS Docker Benchmark v1.7.0 - Control 4.7

## Profile Applicability

- Level 1 - Docker - Linux

## Description

You should not use OS package manager update instructions such as `apt-get update` or `yum update` either alone or in a single line in any Dockerfiles used to generate images under review.

## Rationale

Adding update instructions in a single line on the Dockerfile will cause the update layer to be cached. When you then build any image later using the same instruction, this will cause the previously cached update layer to be used, potentially preventing any fresh updates from being applied to later builds.

## Impact

None

## Audit Procedure

Step 1: Run the command below to get the list of images:

```bash
docker images
```

Step 2: Run the command below against each image in the list above, looking for any update instructions which are incorporated in a single line:

```bash
docker history <Image_ID>
```

Alternatively, if you have access to the Dockerfile for the image, you should verify that there are no update instructions configured as described above.

## Remediation

You should use update instructions together with install instructions and version pinning for packages while installing them. This will prevent caching and force the extraction of the required versions.

Alternatively, you could use the `--no-cache` flag during the `docker build` process to avoid using cached layers.

## Default Value

By default, Docker does not enforce any restrictions on using update instructions.

## References

1. https://docs.docker.com/develop/develop-images/dockerfile_best-practices/

## CIS Controls

**v8:**

- 16.7 Use Standard Hardening Configuration Templates for Application Infrastructure - Use standard, industry-recommended hardening configuration templates for application infrastructure components. This includes underlying servers, databases, and web servers, and applies to cloud containers, Platform as a Service (PaaS) components, and SaaS components. Do not allow in-house developed software to weaken configuration hardening.

**v7:**

- 5.2 Maintain Secure Images - Maintain secure images or templates for all systems in the enterprise based on the organization's approved configuration standards. Any new system deployment or existing system that becomes compromised should be imaged using one of those images or templates.

## Assessment Status

Manual

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…