Project: KICS (Provisioning / Security & Compliance)
File: dockerfile-queries.md

This page contains all queries from Dockerfile. | Query |Severity|Category|More info| ||--|--|--| |Last User Is 'root'<br/><sup><sub>67fd0c4a-68cf-46d7-8c41-bc9fba7e40ae</sub></sup>|<span style="color:#bb2124">High</span>|Best Practices|<a href="../dockerfile-queries/67fd0c4a-68cf-46d7-8c41-bc9fba7e40ae" target="_blank">Query details</a><br><a href="https://docs.docker.com/engine/reference/builder/#user">Documentation</a><br/>| |Missing User Instruction<br/><sup><sub>fd54f200-402c-4333-a5a4-36ef6709af2f</sub></sup>|<span style="color:#bb2124">High</span>|Build Process|<a href="../dockerfile-queries/fd54f200-402c-4333-a5a4-36ef6709af2f" target="_blank">Query details</a><br><a href="https://docs.docker.com/engine/reference/builder/#user">Documentation</a><br/>| |Changing Default Shell Using RUN Command<br/><sup><sub>8a301064-c291-4b20-adcb-403fe7fd95fd</sub></sup>|<span style="color:#ff7213">Medium</span>|Best Practices|<a href="../dockerfile-queries/8a301064-c291-4b20-adcb-403fe7fd95fd" target="_blank">Query details</a><br><a href="https://docs.docker.com/engine/reference/builder/#shell">Documentation</a><br/>| |Image Version Using 'latest'<br/><sup><sub>f45ea400-6bbe-4501-9fc7-1c3d75c32067</sub></sup>|<span style="color:#ff7213">Medium</span>|Best Practices|<a href="../dockerfile-queries/f45ea400-6bbe-4501-9fc7-1c3d75c32067" target="_blank">Query details</a><br><a href="https://docs.docker.com/develop/dev-best-practices/">Documentation</a><br/>| |Not Using JSON In CMD And ENTRYPOINT Arguments<br/><sup><sub>b86987e1-6397-4619-81d5-8807f2387c79</sub></sup>|<span style="color:#ff7213">Medium</span>|Build Process|<a href="../dockerfile-queries/b86987e1-6397-4619-81d5-8807f2387c79" target="_blank">Query details</a><br><a href="https://docs.docker.com/engine/reference/builder/#entrypoint">Documentation</a><br/>| |Run Using Sudo<br/><sup><sub>8ada6e80-0ade-439e-b176-0b28f6bce35a</sub></sup>|<span style="color:#ff7213">Medium</span>|Insecure Configurations|<a href="../dockerfile-queries/8ada6e80-0ade-439e-b176-0b28f6bce35a" target="_blank">Query details</a><br><a href="https://docs.docker.com/engine/reference/builder/#run">Documentation</a><br/>| |Add Instead of Copy<br/><sup><sub>9513a694-aa0d-41d8-be61-3271e056f36b</sub></sup>|<span style="color:#ff7213">Medium</span>|Supply-Chain|<a href="../dockerfile-queries/9513a694-aa0d-41d8-be61-3271e056f36b" target="_blank">Query details</a><br><a href="https://docs.docker.com/engine/reference/builder/#add">Documentation</a><br/>| |Apt Get Install Pin Version Not Defined<br/><sup><sub>965a08d7-ef86-4f14-8792-4a3b2098937e</sub></sup>|<span style="color:#ff7213">Medium</span>|Supply-Chain|<a href="../dockerfile-queries/965a08d7-ef86-4f14-8792-4a3b2098937e" target="blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/dockerfilebest-practices/">Documentation</a><br/>| |Gem Install Without Version<br/><sup><sub>22cd11f7-9c6c-4f6e-84c0-02058120b341</sub></sup>|<span style="color:#ff7213">Medium</span>|Supply-Chain|<a href="../dockerfile-queries/22cd11f7-9c6c-4f6e-84c0-02058120b341" target="blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/dockerfilebest-practices/#run">Documentation</a><br/>| |Image Version Not Explicit<br/><sup><sub>9efb0b2d-89c9-41a3-91ca-dcc0aec911fd</sub></sup>|<span style="color:#ff7213">Medium</span>|Supply-Chain|<a href="../dockerfile-queries/9efb0b2d-89c9-41a3-91ca-dcc0aec911fd" target="_blank">Query details</a><br><a href="https://docs.docker.com/engine/reference/builder/#from">Documentation</a><br/>| |Missing Version Specification In dnf install<br/><sup><sub>93d88cf7-f078-46a8-8ddc-178e03aeacf1</sub></sup>|<span style="color:#ff7213">Medium</span>|Supply-Chain|<a href="../dockerfile-queries/93d88cf7-f078-46a8-8ddc-178e03aeacf1" target="blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/dockerfilebest-practices/">Documentation</a><br/>| |Missing Zypper Non-interactive Switch<br/><sup><sub>45e1fca5-f90e-465d-825f-c2cb63fa3944</sub></sup>|<span style="color:#ff7213">Medium</span>|Supply-Chain|<a href="../dockerfile-queries/45e1fca5-f90e-465d-825f-c2cb63fa3944" target="blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/dockerfilebest-practices/#run">Documentation</a><br/>| |NPM Install Command Without Pinned Version<br/><sup><sub>e36d8880-3f78-4546-b9a1-12f0745ca0d5</sub></sup>|<span style="color:#ff7213">Medium</span>|Supply-Chain|<a href="../dockerfile-queries/e36d8880-3f78-4546-b9a1-12f0745ca0d5" target="_blank">Query details</a><br><a href="https://docs.docker.com/engine/reference/builder/#run">Documentation</a><br/>| |Unpinned Package Version in Apk Add<br/><sup><sub>d3499f6d-1651-41bb-a9a7-de925fea487b</sub></sup>|<span style="color:#ff7213">Medium</span>|Supply-Chain|<a href="../dockerfile-queries/d3499f6d-1651-41bb-a9a7-de925fea487b" target="blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/dockerfilebest-practices/">Documentation</a><br/>| |Unpinned Package Version in Pip Install<br/><sup><sub>02d9c71f-3ee8-4986-9c27-1a20d0d19bfc</sub></sup>|<span style="color:#ff7213">Medium</span>|Supply-Chain|<a href="../dockerfile-queries/02d9c71f-3ee8-4986-9c27-1a20d0d19bfc" target="blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/dockerfilebest-practices/">Documentation</a><br/>| |Yum install Without Version<br/><sup><sub>6452c424-1d92-4deb-bb18-a03e95d579c4</sub></sup>|<span style="color:#ff7213">Medium</span>|Supply-Chain|<a href="../dockerfile-queries/6452c424-1d92-4deb-bb18-a03e95d579c4" target="blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/dockerfilebest-practices/#run">Documentation</a><br/>| |Chown Flag Exists<br/><sup><sub>aa93e17f-b6db-4162-9334-c70334e7ac28</sub></sup>|<span style="color:#edd57e">Low</span>|Best Practices|<a href="../dockerfile-queries/aa93e17f-b6db-4162-9334-c70334e7ac28" target="blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/dockerfilebest-practices/">Documentation</a><br/>| |Curl or Wget Instead of Add<br/><sup><sub>4b410d24-1cbe-4430-a632-62c9a931cf1c</sub></sup>|<span style="color:#edd57e">Low</span>|Best Practices|<a href="../dockerfile-queries/4b410d24-1cbe-4430-a632-62c9a931cf1c" target="blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/dockerfilebest-practices/">Documentation</a><br/>| |Exposing Port 22 (SSH)<br/><sup><sub>5907595b-5b6d-4142-b173-dbb0e73fbff8</sub></sup>|<span style="color:#edd57e">Low</span>|Best Practices|<a href="../dockerfile-queries/5907595b-5b6d-4142-b173-dbb0e73fbff8" target="_blank">Query details</a><br><a href="https://sysdig.com/blog/dockerfile-best-practices/">Documentation</a><br/>| |MAINTAINER Instruction Being Used<br/><sup><sub>99614418-f82b-4852-a9ae-5051402b741c</sub></sup>|<span style="color:#edd57e">Low</span>|Best Practices|<a href="../dockerfile-queries/99614418-f82b-4852-a9ae-5051402b741c" target="_blank">Query details</a><br><a href="https://docs.docker.com/engine/reference/builder/#maintainer-deprecated">Documentation</a><br/>| |Missing Dnf Clean All<br/><sup><sub>295acb63-9246-4b21-b441-7c1f1fb62dc0</sub></sup>|<span style="color:#edd57e">Low</span>|Best Practices|<a href="../dockerfile-queries/295acb63-9246-4b21-b441-7c1f1fb62dc0" target="blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/dockerfilebest-practices/">Documentation</a><br/>| |Missing Zypper Clean<br/><sup><sub>38300d1a-feb2-4a48-936a-d1ef1cd24313</sub></sup>|<span style="color:#edd57e">Low</span>|Best Practices|<a href="../dockerfile-queries/38300d1a-feb2-4a48-936a-d1ef1cd24313" target="blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/dockerfilebest-practices/#run">Documentation</a><br/>| |Multiple RUN, ADD, COPY, Instructions Listed<br/><sup><sub>0008c003-79aa-42d8-95b8-1c2fe37dbfe6</sub></sup>|<span style="color:#edd57e">Low</span>|Best Practices|<a href="../dockerfile-queries/0008c003-79aa-42d8-95b8-1c2fe37dbfe6" target="_blank">Query details</a><br><a href="https://sysdig.com/blog/dockerfile-best-practices/">Documentation</a><br/>| |Pip install Keeping Cached Packages<br/><sup><sub>f2f903fb-b977-461e-98d7-b3e2185c6118</sub></sup>|<span style="color:#edd57e">Low</span>|Best Practices|<a href="../dockerfile-queries/f2f903fb-b977-461e-98d7-b3e2185c6118" target="blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/dockerfilebest-practices/">Documentation</a><br/>| |Using Platform Flag with FROM Command<br/><sup><sub>b16e8501-ef3c-44e1-a543-a093238099c9</sub></sup>|<span style="color:#edd57e">Low</span>|Best Practices|<a href="../dockerfile-queries/b16e8501-ef3c-44e1-a543-a093238099c9" target="_blank">Query details</a><br><a href="https://docs.docker.com/engine/reference/builder/#from">Documentation</a><br/>| |Yum Clean All Missing<br/><sup><sub>00481784-25aa-4a55-8633-3136dfcf4f37</sub></sup>|<span style="color:#edd57e">Low</span>|Best Practices|<a href="../dockerfile-queries/00481784-25aa-4a55-8633-3136dfcf4f37" target="blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/dockerfilebest-practices/#run">Documentation</a><br/>| |COPY '--from' References Current FROM Alias<br/><sup><sub>cdddb86f-95f6-4fc4-b5a1-483d9afceb2b</sub></sup>|<span style="color:#edd57e">Low</span>|Build Process|<a href="../dockerfile-queries/cdddb86f-95f6-4fc4-b5a1-483d9afceb2b" target="_blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/multistage-build/">Documentation</a><br/>| |Copy With More Than Two Arguments Not Ending With Slash<br/><sup><sub>6db6e0c2-32a3-4a2e-93b5-72c35f4119db</sub></sup>|<span style="color:#edd57e">Low</span>|Build Process|<a href="../dockerfile-queries/6db6e0c2-32a3-4a2e-93b5-72c35f4119db" target="_blank">Query details</a><br><a href="https://docs.docker.com/engine/reference/builder/#copy">Documentation</a><br/>| |Multiple CMD Instructions Listed<br/><sup><sub>41c195f4-fc31-4a5c-8a1b-90605538d49f</sub></sup>|<span style="color:#edd57e">Low</span>|Build Process|<a href="../dockerfile-queries/41c195f4-fc31-4a5c-8a1b-90605538d49f" target="_blank">Query details</a><br><a href="https://docs.docker.com/engine/reference/builder/#cmd">Documentation</a><br/>| |Multiple ENTRYPOINT Instructions Listed<br/><sup><sub>6938958b-3f1a-451c-909b-baeee14bdc97</sub></sup>|<span style="color:#edd57e">Low</span>|Build Process|<a href="../dockerfile-queries/6938958b-3f1a-451c-909b-baeee14bdc97" target="_blank">Query details</a><br><a href="https://docs.docker.com/engine/reference/builder/#entrypoint">Documentation</a><br/>| |RUN Instruction Using 'cd' Instead of WORKDIR<br/><sup><sub>f4a6bcd3-e231-4acf-993c-aa027be50d2e</sub></sup>|<span style="color:#edd57e">Low</span>|Build Process|<a href="../dockerfile-queries/f4a6bcd3-e231-4acf-993c-aa027be50d2e" target="blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/dockerfilebest-practices/#workdir">Documentation</a><br/>| |Same Alias In Different Froms<br/><sup><sub>f2daed12-c802-49cd-afed-fe41d0b82fed</sub></sup>|<span style="color:#edd57e">Low</span>|Build Process|<a href="../dockerfile-queries/f2daed12-c802-49cd-afed-fe41d0b82fed" target="_blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/multistage-build/">Documentation</a><br/>| |Update Instruction Alone<br/><sup><sub>9bae49be-0aa3-4de5-bab2-4c3a069e40cd</sub></sup>|<span style="color:#edd57e">Low</span>|Build Process|<a href="../dockerfile-queries/9bae49be-0aa3-4de5-bab2-4c3a069e40cd" target="blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/dockerfilebest-practices/#run">Documentation</a><br/>| |Using Unnamed Build Stages<br/><sup><sub>68a51e22-ae5a-4d48-8e87-b01a323605c9</sub></sup>|<span style="color:#edd57e">Low</span>|Build Process|<a href="../dockerfile-queries/68a51e22-ae5a-4d48-8e87-b01a323605c9" target="_blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/multistage-build/">Documentation</a><br/>| |WORKDIR Path Not Absolute<br/><sup><sub>6b376af8-cfe8-49ab-a08d-f32de23661a4</sub></sup>|<span style="color:#edd57e">Low</span>|Build Process|<a href="../dockerfile-queries/6b376af8-cfe8-49ab-a08d-f32de23661a4" target="blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/dockerfilebest-practices/#workdir">Documentation</a><br/>| |Healthcheck Instruction Missing<br/><sup><sub>b03a748a-542d-44f4-bb86-9199ab4fd2d5</sub></sup>|<span style="color:#edd57e">Low</span>|Insecure Configurations|<a href="../dockerfile-queries/b03a748a-542d-44f4-bb86-9199ab4fd2d5" target="_blank">Query details</a><br><a href="https://docs.docker.com/engine/reference/builder/#healthcheck">Documentation</a><br/>| |Shell Running A Pipe Without Pipefail Flag<br/><sup><sub>efbf148a-67e9-42d2-ac47-02fa1c0d0b22</sub></sup>|<span style="color:#edd57e">Low</span>|Insecure Defaults|<a href="../dockerfile-queries/efbf148a-67e9-42d2-ac47-02fa1c0d0b22" target="_blank">Query details</a><br><a href="https://docs.docker.com/engine/reference/builder/#run">Documentation</a><br/>| |APT-GET Missing '-y' To Avoid Manual Input<br/><sup><sub>77783205-c4ca-4f80-bb80-c777f267c547</sub></sup>|<span style="color:#edd57e">Low</span>|Supply-Chain|<a href="../dockerfile-queries/77783205-c4ca-4f80-bb80-c777f267c547" target="_blank">Query details</a><br><a href="https://docs.docker.com/engine/reference/builder/#run">Documentation</a><br/>| |Missing Flag From Dnf Install<br/><sup><sub>7ebd323c-31b7-4e5b-b26f-de5e9e477af8</sub></sup>|<span style="color:#edd57e">Low</span>|Supply-Chain|<a href="../dockerfile-queries/7ebd323c-31b7-4e5b-b26f-de5e9e477af8" target="blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/dockerfilebest-practices/#run">Documentation</a><br/>| |Run Using 'wget' and 'curl'<br/><sup><sub>fc775e75-fcfb-4c98-b2f2-910c5858b359</sub></sup>|<span style="color:#edd57e">Low</span>|Supply-Chain|<a href="../dockerfile-queries/fc775e75-fcfb-4c98-b2f2-910c5858b359" target="blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/dockerfilebest-practices/#run">Documentation</a><br/>| |Run Using apt<br/><sup><sub>b84a0b47-2e99-4c9f-8933-98bcabe2b94d</sub></sup>|<span style="color:#edd57e">Low</span>|Supply-Chain|<a href="../dockerfile-queries/b84a0b47-2e99-4c9f-8933-98bcabe2b94d" target="blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/dockerfilebest-practices/#run">Documentation</a><br/>| |Yum Install Allows Manual Input<br/><sup><sub>6e19193a-8753-436d-8a09-76dcff91bb03</sub></sup>|<span style="color:#edd57e">Low</span>|Supply-Chain|<a href="../dockerfile-queries/6e19193a-8753-436d-8a09-76dcff91bb03" target="_blank">Query details</a><br><a href="https://docs.docker.com/engine/reference/builder/#run">Documentation</a><br/>| |Zypper Install Without Version<br/><sup><sub>562952e4-0348-4dea-9826-44f3a2c6117b</sub></sup>|<span style="color:#edd57e">Low</span>|Supply-Chain|<a href="../dockerfile-queries/562952e4-0348-4dea-9826-44f3a2c6117b" target="blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/dockerfilebest-practices/#run">Documentation</a><br/>| |UNIX Ports Out Of Range<br/><sup><sub>71bf8cf8-f0a1-42fa-b9d2-d10525e0a38e</sub></sup>|<span style="color:#5bc0de">Info</span>|Networking and Firewall|<a href="../dockerfile-queries/71bf8cf8-f0a1-42fa-b9d2-d10525e0a38e" target="_blank">Query details</a><br><a href="https://docs.docker.com/engine/reference/builder/#expose">Documentation</a><br/>| |Apk Add Using Local Cache Path<br/><sup><sub>ae9c56a6-3ed1-4ac0-9b54-31267f51151d</sub></sup>|<span style="color:#5bc0de">Info</span>|Supply-Chain|<a href="../dockerfile-queries/ae9c56a6-3ed1-4ac0-9b54-31267f51151d" target="_blank">Query details</a><br><a href="https://docs.docker.com/engine/reference/builder/#run">Documentation</a><br/>| |Apt Get Install Lists Were Not Deleted<br/><sup><sub>df746b39-6564-4fed-bf85-e9c44382303c</sub></sup>|<span style="color:#5bc0de">Info</span>|Supply-Chain|<a href="../dockerfile-queries/df746b39-6564-4fed-bf85-e9c44382303c" target="blank">Query details</a><br><a href="https://docs.docker.com/develop/develop-images/dockerfilebest-practices/">Documentation</a><br/>| |APT-GET Not Avoiding Additional Packages<br/><sup><sub>7384dfb2-fcd1-4fbf-91cd-6c44c318c33c</sub></sup>|<span style="color:#5bc0de">Info</span>|Supply-Chain|<a href="../dockerfile-queries/7384dfb2-fcd1-4fbf-91cd-6c44c318c33c" target="_blank">Query details</a><br><a href="https://docs.docker.com/engine/reference/builder/#run">Documentation</a><br/>| |Run Utilities And POSIX Commands<br/><sup><sub>9b6b0f38-92a2-41f9-b881-3a1083d99f1b</sub></sup>|<span style="color:#5bc0de">Info</span>|Supply-Chain|<a href="../dockerfile-queries/9b6b0f38-92a2-41f9-b881-3a1083d99f1b" target="_blank">Query details</a><br><a href="https://docs.docker.com/engine/reference/builder/#run">Documentation</a><br/>|