For the complete documentation index, see llms.txt. This page is also available as Markdown.
Cortex CloudApplication Security

Docker WORKDIR values are not absolute paths misconfiguration detected in code

Rule Details

Cortex AppSec Rule ID

APPSEC_DOCKER_10

Category - Subcategory

Compute - Startup Script Leaks

Provider

OTHER

Severity

LOW

Framework

DOCKER

Impact

This rule detects whether all WORKDIR values specified in Dockerfiles are absolute paths. Absolute paths prevent ambiguity, ensure correct directory navigate to the intended directory structure, and contribute to predictable behavior during image build and runtime. Therefore, we recommend always using absolute paths for WORKDIR instruction in Dockerfiles.

How to Fix

To mitigate this issue, ensure that all WORKDIR instructions in your Dockerfile use absolute paths.

Example: [source,go]

  • WORKDIR relative/path

  • WORKDIR /absolute/path


Last updated

Was this helpful?