> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/appsec-rules/iac-security/compute/appsec-k8s-43.md).

# Images are not selected using a digest misconfiguration detected in code

## Rule Details

|                        |                                                        |
| ---------------------- | ------------------------------------------------------ |
| Cortex AppSec Rule ID  | APPSEC\_K8S\_43                                        |
| Category - Subcategory | Kubernetes - Resource Management                       |
| Provider               | OTHER                                                  |
| Severity               | LOW                                                    |
| Framework              | Helm, Kubernetes, Kustomize, Terraform, Terraform Plan |

## Impact

In some cases you may prefer to use a fixed version of an image, rather than update to newer versions. Docker enables you to pull an image by its digest, specifying exactly which version of an image to pull. Pulling using a digest allows you to "`pin`" an image to that version, and guarantee that the image you're using is always the same. Digests also prevent race-conditions; if a new image is pushed while a deploy is in progress, different nodes may be pulling the images at different times, so some nodes have the new image, and some have the old one. Services automatically resolve tags to digests, so you don't need to manually specify a digest.

## How to Fix

*Resource:* image

* *Arguments:* digest \[source,go]

***

apiVersion: v1 kind: Pod metadata: name: spec: containers:

* name: image: image\@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2

***

{ "creator": 7, "id": 2110, "image\_id": null, "images": \[ { "architecture": "amd64", "features": "", "variant": null,

* "digest": "sha256:1ae98b2c895d1ceeba8913ff79f422f005b7f967a311da520a88ac89180b4c39", "os": "linux", "os\_features": "", "os\_version": null, "size": 87342331 } ], "last\_updated": "2017-04-06T20:16:24.015937Z", "last\_updater": 2215, "last\_updater\_username": "stackbrew", "name": "centos5", "repository": 54, "full\_size": 87342331, "v2": true }

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/appsec-rules/iac-security/compute/appsec-k8s-43.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
