{"id":311809,"date":"2020-10-21T15:00:14","date_gmt":"2020-10-21T15:00:14","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=311809"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=311809","title":{"rendered":"\u0421\u043f\u043e\u0441\u043e\u0431\u044b \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0443\u0442\u0438\u043b\u0438\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 Docker"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/uj\/hj\/xj\/ujhjxjvyqkeofft-kv3k8y8nvce.png\"><br \/>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/p>\n<p>  \u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u0437-\u0437\u0430 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u044e\u0449\u0435\u0439 \u0440\u043e\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0435 \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u043c\u0435\u0441\u0442\u0435 \u0441\u0442\u043e\u0438\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044d\u0442\u0430\u043f\u043e\u0432 \u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438. \u041e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0432 \u0440\u0443\u0447\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0440\u0443\u0434\u043e\u0451\u043c\u043a\u0438\u043c \u0437\u0430\u043d\u044f\u0442\u0438\u0435\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0448\u0430\u0433\u0438 \u043a \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u043c\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438 \u0434\u043b\u044f \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0443\u0442\u0438\u043b\u0438\u0442 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 Docker \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0434\u0435\u043c\u043e-\u0441\u0442\u0435\u043d\u0434 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 Dockerfile. \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0443 \u0432\u0441\u0435\u0445 \u0440\u0430\u0437\u043d\u044b\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0438\u0436\u0435 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h1>\u0423\u0442\u0438\u043b\u0438\u0442\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438<\/h1>\n<p>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0445 \u0430\u0441\u043f\u0435\u043a\u0442\u043e\u0432 Docker-\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u0427\u0430\u0441\u0442\u044c \u0438\u0437 \u043d\u0438\u0445 \u0443\u0436\u0435 \u0431\u044b\u043b\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 (<a href=\"https:\/\/habr.com\/ru\/company\/swordfish_security\/blog\/518758\/#docker-security\">https:\/\/habr.com\/ru\/company\/swordfish_security\/blog\/518758\/#docker-security<\/a>), \u0430 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0435 \u044f \u0431\u044b \u0445\u043e\u0442\u0435\u043b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0442\u0440\u0435\u0445 \u0438\u0437 \u043d\u0438\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 Docker-\u043e\u0431\u0440\u0430\u0437\u043e\u0432, \u0441\u0442\u0440\u043e\u044f\u0449\u0438\u0445\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u041f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e \u044f \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043a\u0430\u0436\u0443 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u044d\u0442\u0438 \u0442\u0440\u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432 \u043e\u0434\u0438\u043d pipeline \u0434\u043b\u044f \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  <b>Hadolint<\/b><br \/>  <a href=\"https:\/\/github.com\/hadolint\/hadolint\">https:\/\/github.com\/hadolint\/hadolint<\/a><\/p>\n<p>  \u0414\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0438 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 Dockerfile-\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0435\u0441\u0442\u0440\u043e\u0432 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 sudo). <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ef\/t1\/xe\/eft1xewifekhvf2lv-18letx6xm.png\" alt=\"\u0412\u044b\u0432\u043e\u0434 \u0443\u0442\u0438\u043b\u0438\u0442\u044b Hadolint\" title=\"\u0412\u044b\u0432\u043e\u0434 \u0443\u0442\u0438\u043b\u0438\u0442\u044b Hadolint\"><\/p>\n<p>  <b>Dockle<\/b><br \/>  <a href=\"https:\/\/github.com\/goodwithtech\/dockle\">https:\/\/github.com\/goodwithtech\/dockle<\/a><\/p>\n<p>  \u041a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0430\u044f \u0441 \u043e\u0431\u0440\u0430\u0437\u043e\u043c (\u0438\u043b\u0438 \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u043c tar-\u0430\u0440\u0445\u0438\u0432\u043e\u043c \u043e\u0431\u0440\u0430\u0437\u0430), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 \u043a\u0430\u043a \u0442\u0430\u043a\u043e\u0432\u043e\u0433\u043e, \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044f \u0435\u0433\u043e \u0441\u043b\u043e\u0438 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u2013 \u043a\u0430\u043a\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b, \u043a\u0430\u043a\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f, \u043a\u0430\u043a\u0438\u0435 \u0442\u043e\u043c\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b, \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043f\u0443\u0441\u0442\u043e\u0433\u043e \u043f\u0430\u0440\u043e\u043b\u044f \u0438 \u0442. \u0434. \u041f\u043e\u043a\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0438 \u0431\u0430\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u0445 \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u0445 <a href=\"https:\/\/www.cisecurity.org\/benchmark\/docker\/\">CIS (Center for Internet Security) Benchmark<\/a> \u0434\u043b\u044f Docker.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gy\/hv\/wp\/gyhvwpx3wah__f5s1rmjzcf8wzu.png\" title=\"\u0412\u044b\u0432\u043e\u0434 \u0443\u0442\u0438\u043b\u0438\u0442\u044b Dockle\"><\/p>\n<p>  <b>Trivy<\/b><br \/>  <a href=\"https:\/\/github.com\/aquasecurity\/trivy\">https:\/\/github.com\/aquasecurity\/trivy<\/a><\/p>\n<p>  \u042d\u0442\u0430 \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u043d\u0430\u0446\u0435\u043b\u0435\u043d\u0430 \u043d\u0430 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0434\u0432\u0443\u0445 \u0442\u0438\u043f\u043e\u0432 \u2013 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441\u0431\u043e\u0440\u043e\u043a \u041e\u0421 (\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f Alpine, RedHat (EL), CentOS, Debian GNU, Ubuntu) \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u0445 (Gemfile.lock, Pipfile.lock, composer.lock, package-lock.json, yarn.lock, Cargo.lock). Trivy \u0443\u043c\u0435\u0435\u0442 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0437 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, \u0442\u0430\u043a \u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0433\u043e .tar \u0444\u0430\u0439\u043b\u0430 \u0441 Docker-\u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ta\/nq\/cw\/tanqcw3ykvppn9nxxigy0vmzj-k.png\" title=\"\u0412\u044b\u0432\u043e\u0434 \u0443\u0442\u0438\u043b\u0438\u0442\u044b Trivy\"><\/p>\n<h1>\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0443\u0442\u0438\u043b\u0438\u0442<\/h1>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0432 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0432\u0441\u0435\u0445 \u0443\u0442\u0438\u043b\u0438\u0442 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e Dockerfile \u0438 Docker-\u043e\u0431\u0440\u0430\u0437\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<p>  \u0421\u0430\u043c\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0448\u0430\u0433\u043e\u0432:  <\/p>\n<ol>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 Dockerfile \u2014 \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 \u043b\u0438\u043d\u0442\u0435\u0440\u043e\u043c <b>Hadolint <\/b><\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0438 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u2014 \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 <b>Dockle<\/b> <\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u043e\u0431\u0449\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439 (CVE) \u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u043e\u0431\u0440\u0430\u0437\u0435 \u0438 \u0440\u044f\u0434\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u2014 \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 <b>Trivy<\/b><\/li>\n<\/ol>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0442\u0440\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0448\u0430\u0433\u043e\u0432:<br \/>  \u041f\u0435\u0440\u0432\u044b\u0439 \u2014 \u043f\u0443\u0442\u0451\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 CI\/CD pipeline \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 GitLab (\u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u043e\u0434\u043d\u044f\u0442\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0430).<br \/>  \u0412\u0442\u043e\u0440\u043e\u0439 \u2014 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c shell-\u0441\u043a\u0440\u0438\u043f\u0442\u0430.<br \/>  \u0422\u0440\u0435\u0442\u0438\u0439 \u2014 \u0441 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435\u043c Docker-\u043e\u0431\u0440\u0430\u0437\u0430 \u0434\u043b\u044f \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Docker-\u043e\u0431\u0440\u0430\u0437\u043e\u0432.<br \/>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0430\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0435\u0433\u043e \u043d\u0430 \u0441\u0432\u043e\u044e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u043d\u0443\u0436\u0434\u044b.<\/p>\n<p>  \u0412\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438: <a href=\"https:\/\/github.com\/Swordfish-Security\/docker_cicd\">https:\/\/github.com\/Swordfish-Security\/docker_cicd<\/a><\/p>\n<h3>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0432 GitLab CI\/CD<\/h3>\n<p>  \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 GitLab. \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043f\u0440\u043e\u0439\u0434\u0435\u043c \u043f\u043e \u0448\u0430\u0433\u0430\u043c \u0438 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043a\u0430\u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441 \u043d\u0443\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0441 GitLab, \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a \u0443\u0442\u0438\u043b\u0438\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e Dockerfile \u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 \u2014 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f JuiceShop.<\/p>\n<p>  <b>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 GitLab<\/b><br \/>  1. \u0421\u0442\u0430\u0432\u0438\u043c Docker:  <\/p>\n<pre><code class=\"bash\">sudo apt-get update &amp;&amp; sudo apt-get install docker.io<\/code><\/pre>\n<p>  2. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 docker, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0434\u043e\u043a\u0435\u0440\u043e\u043c \u043d\u0435 \u0447\u0435\u0440\u0435\u0437 sudo:  <\/p>\n<pre><code class=\"bash\">sudo addgroup &lt;username&gt; docker<\/code><\/pre>\n<p>  3. \u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0441\u0432\u043e\u0439 IP:  <\/p>\n<pre><code class=\"bash\">ip addr<\/code><\/pre>\n<p>  4. \u0421\u0442\u0430\u0432\u0438\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c GitLab \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435, \u0437\u0430\u043c\u0435\u043d\u044f\u044f IP \u0430\u0434\u0440\u0435\u0441 \u0432 hostname \u043d\u0430 \u0441\u0432\u043e\u0439:  <\/p>\n<pre><code class=\"bash\">docker run --detach \\ --hostname 192.168.1.112 \\ --publish 443:443 --publish 80:80 \\ --name gitlab \\ --restart always \\ --volume \/srv\/gitlab\/config:\/etc\/gitlab \\ --volume \/srv\/gitlab\/logs:\/var\/log\/gitlab \\ --volume \/srv\/gitlab\/data:\/var\/opt\/gitlab \\ gitlab\/gitlab-ce:latest<\/code><\/pre>\n<p>  \u0416\u0434\u0451\u043c, \u043f\u043e\u043a\u0430 GitLab \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 (\u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0447\u0435\u0440\u0435\u0437 \u0432\u044b\u0432\u043e\u0434 \u043b\u043e\u0433-\u0444\u0430\u0439\u043b\u0430: docker logs -f gitlab).<\/p>\n<p>  5. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0441\u0432\u043e\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 IP \u0438 \u0432\u0438\u0434\u0438\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f root:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pi\/wv\/wu\/piwvwuippx8bc1enrtcdbhloqoc.png\"><br \/>  \u0417\u0430\u0434\u0430\u0451\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u0438 \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432 GitLab.<\/p>\n<p>  6. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 cicd-test \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c <i>README.md<\/i>:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/tm\/hu\/0-\/tmhu0-sw2ja-h8gukpd4swz_hbs.png\"><br \/>  7. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c GitLab Runner: \u0430\u0433\u0435\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. <br \/>  \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u043f\u043e\u0434 Linux 64-bit):  <\/p>\n<pre><code class=\"bash\">sudo curl -L --output \/usr\/local\/bin\/gitlab-runner https:\/\/gitlab-runner-downloads.s3.amazonaws.com\/latest\/binaries\/gitlab-runner-linux-amd64<\/code><\/pre>\n<p>  8. \u0414\u0435\u043b\u0430\u0435\u043c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u043c:  <\/p>\n<pre><code class=\"bash\">sudo chmod +x \/usr\/local\/bin\/gitlab-runner<\/code><\/pre>\n<p>  9. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u041e\u0421 \u0434\u043b\u044f Runner-\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441:  <\/p>\n<pre><code class=\"bash\">sudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell \/bin\/bash sudo gitlab-runner install --user=gitlab-runner --working-directory=\/home\/gitlab-runner sudo gitlab-runner start<\/code><\/pre>\n<p>  \u0414\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\">local@osboxes:~$ sudo gitlab-runner install --user=gitlab-runner --working-directory=\/home\/gitlab-runner Runtime platform arch=amd64 os=linux pid=8438 revision=0e5417a3 version=12.0.1 local@osboxes:~$ sudo gitlab-runner start Runtime platform arch=amd64 os=linux pid=8518 revision=0e5417a3 version=12.0.1<\/code><\/pre>\n<p>  10. \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c Runner, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043c\u043e\u0433 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u043d\u0430\u0448\u0438\u043c \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u043c GitLab.<br \/>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 Settings-CI\/CD (http:\/\/OUR_ IP_ADDRESS\/root\/cicd-test\/-\/settings\/ci_cd) \u0438 \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 Runners \u043d\u0430\u0445\u043e\u0434\u0438\u043c URL \u0438 Registration token:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/9h\/5r\/ie\/9h5rie5oe6etd_5fdjkbbydqr8e.png\"><br \/>  11. \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c Runner, \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044f URL \u0438 Registration token:  <\/p>\n<pre><code class=\"bash\">sudo gitlab-runner register \\ --non-interactive \\ --url &quot;http:\/\/&lt;URL&gt;\/&quot; \\ --registration-token &quot;&lt;Registration Token&gt;&quot; \\ --executor &quot;docker&quot; \\ --docker-privileged \\ --docker-image alpine:latest \\ --description &quot;docker-runner&quot; \\ --tag-list &quot;docker,privileged&quot; \\ --run-untagged=&quot;true&quot; \\ --locked=&quot;false&quot; \\ --access-level=&quot;not_protected&quot;<\/code><\/pre>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 GitLab, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0441\u0442\u0430\u0440\u0442\u0430 \u043d\u0430\u0448\u0438\u0445 \u0443\u0442\u0438\u043b\u0438\u0442. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443 \u043d\u0430\u0441 \u043d\u0435\u0442 \u0448\u0430\u0433\u043e\u0432 \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u043e \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0433\u0430\u043c \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437\u044b \u0438 Dockerfile \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430.<\/p>\n<p>  <b>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f pipeline<\/b><\/p>\n<p>  1. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0444\u0430\u0439\u043b\u044b <i>mydockerfile.df<\/i> (\u044d\u0442\u043e \u043d\u0435\u043a\u0438\u0439 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 Dockerfile, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c) \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b GitLab CI\/CD \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 <i>.gitlab-cicd.yml<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0441\u043a\u0430\u043d\u0435\u0440\u043e\u0432 (\u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e\u0447\u043a\u0443 \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u0430).<\/p>\n<p>  YAML-\u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u0442\u0440\u0435\u0445 \u0443\u0442\u0438\u043b\u0438\u0442 (Hadolint, Dockle \u0438 Trivy), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 Dockerfile \u0438 \u043e\u0431\u0440\u0430\u0437, \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 DOCKERFILE. \u0412\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f: <a href=\"https:\/\/github.com\/Swordfish-Security\/docker_cicd\/\">https:\/\/github.com\/Swordfish-Security\/docker_cicd\/<\/a><\/p>\n<p>  \u0412\u044b\u0434\u0435\u0440\u0436\u043a\u0430 \u0438\u0437 <i>mydockerfile.df<\/i> (\u044d\u0442\u043e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0443\u0442\u0438\u043b\u0438\u0442\u044b). \u041f\u0440\u044f\u043c\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0444\u0430\u0439\u043b: <a href=\"https:\/\/github.com\/Swordfish-Security\/docker_cicd\/blob\/master\/mydockerfile.df\">mydockerfile.df<\/a><\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 mydockerfile.df<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"plaintext\">FROM amd64\/node:10.16.0-alpine@sha256:f59303fb3248e5d992586c76cc83e1d3700f641cbcd7c0067bc7ad5bb2e5b489 AS tsbuild COPY package.json . COPY yarn.lock . RUN yarn install COPY lib lib COPY tsconfig.json tsconfig.json COPY tsconfig.app.json tsconfig.app.json RUN yarn build FROM amd64\/ubuntu:18.04@sha256:eb70667a801686f914408558660da753cde27192cd036148e58258819b927395 LABEL maintainer=&quot;Rhys Arkins &lt;rhys@arkins.net&gt;&quot; LABEL name=&quot;renovate&quot; ... COPY php.ini \/usr\/local\/etc\/php\/php.ini RUN cp -a \/tmp\/piik\/* \/var\/www\/html\/ RUN rm -rf \/tmp\/piwik RUN chown -R www-data \/var\/www\/html ADD piwik-cli-setup \/piwik-cli-setup ADD reset.php \/var\/www\/html\/ ## ENTRYPOINT ## ADD entrypoint.sh \/entrypoint.sh ENTRYPOINT [&quot;\/entrypoint.sh&quot;] USER root<\/code><\/pre>\n<\/div><\/div>\n<p>  \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 YAML \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c (\u0441\u0430\u043c \u0444\u0430\u0439\u043b \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043f\u043e \u043f\u0440\u044f\u043c\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435 \u0437\u0434\u0435\u0441\u044c: <a href=\"https:\/\/github.com\/Swordfish-Security\/docker_cicd\/blob\/master\/.gitlab-ci.yml\">.gitlab-ci.yml<\/a>):<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 .gitlab-ci.yml<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"plaintext\">variables:     DOCKER_HOST: &quot;tcp:\/\/docker:2375\/&quot;     DOCKERFILE: &quot;mydockerfile.df&quot; # name of the Dockerfile to analyse        DOCKERIMAGE: &quot;bkimminich\/juice-shop&quot; # name of the Docker image to analyse     # DOCKERIMAGE: &quot;knqyf263\/cve-2018-11235&quot; # test Docker image with several CRITICAL CVE     SHOWSTOPPER_PRIORITY: &quot;CRITICAL&quot; # what level of criticality will fail Trivy job     TRIVYCACHE: &quot;$CI_PROJECT_DIR\/.cache&quot; # where to cache Trivy database of vulnerabilities for faster reuse     ARTIFACT_FOLDER: &quot;$CI_PROJECT_DIR&quot;   services:     - docker:dind # to be able to build docker images inside the Runner   stages:     - scan     - report     - publish   HadoLint:     # Basic lint analysis of Dockerfile instructions     stage: scan     image: docker:git       after_script:     - cat $ARTIFACT_FOLDER\/hadolint_results.json       script:     - export VERSION=$(wget -q -O - https:\/\/api.github.com\/repos\/hadolint\/hadolint\/releases\/latest | grep '&quot;tag_name&quot;:' | sed -E 's\/.*&quot;v([^&quot;]+)&quot;.*\/\\1\/')     - wget https:\/\/github.com\/hadolint\/hadolint\/releases\/download\/v${VERSION}\/hadolint-Linux-x86_64 &amp;&amp; chmod +x hadolint-Linux-x86_64           # NB: hadolint will always exit with 0 exit code     - .\/hadolint-Linux-x86_64 -f json $DOCKERFILE &gt; $ARTIFACT_FOLDER\/hadolint_results.json || exit 0       artifacts:         when: always # return artifacts even after job failure                paths:         - $ARTIFACT_FOLDER\/hadolint_results.json   Dockle:     # Analysing best practices about docker image (users permissions, instructions followed when image was built, etc.)     stage: scan        image: docker:git       after_script:     - cat $ARTIFACT_FOLDER\/dockle_results.json       script:     - export VERSION=$(wget -q -O - https:\/\/api.github.com\/repos\/goodwithtech\/dockle\/releases\/latest | grep '&quot;tag_name&quot;:' | sed -E 's\/.*&quot;v([^&quot;]+)&quot;.*\/\\1\/')     - wget https:\/\/github.com\/goodwithtech\/dockle\/releases\/download\/v${VERSION}\/dockle_${VERSION}_Linux-64bit.tar.gz &amp;&amp; tar zxf dockle_${VERSION}_Linux-64bit.tar.gz     - .\/dockle --exit-code 1 -f json --output $ARTIFACT_FOLDER\/dockle_results.json $DOCKERIMAGE              artifacts:         when: always # return artifacts even after job failure                paths:         - $ARTIFACT_FOLDER\/dockle_results.json   Trivy:     # Analysing docker image and package dependencies against several CVE bases     stage: scan        image: docker:git       script:     # getting the latest Trivy     - apk add rpm     - export VERSION=$(wget -q -O - https:\/\/api.github.com\/repos\/knqyf263\/trivy\/releases\/latest | grep '&quot;tag_name&quot;:' | sed -E 's\/.*&quot;v([^&quot;]+)&quot;.*\/\\1\/')     - wget https:\/\/github.com\/knqyf263\/trivy\/releases\/download\/v${VERSION}\/trivy_${VERSION}_Linux-64bit.tar.gz &amp;&amp; tar zxf trivy_${VERSION}_Linux-64bit.tar.gz           # displaying all vulnerabilities w\/o failing the build     - .\/trivy -d --cache-dir $TRIVYCACHE -f json -o $ARTIFACT_FOLDER\/trivy_results.json --exit-code 0 $DOCKERIMAGE              # write vulnerabilities info to stdout in human readable format (reading pure json is not fun, eh?). You can remove this if you don't need this.     - .\/trivy -d --cache-dir $TRIVYCACHE --exit-code 0 $DOCKERIMAGE           # failing the build if the SHOWSTOPPER priority is found     - .\/trivy -d --cache-dir $TRIVYCACHE --exit-code 1 --severity $SHOWSTOPPER_PRIORITY --quiet $DOCKERIMAGE               artifacts:         when: always # return artifacts even after job failure         paths:         - $ARTIFACT_FOLDER\/trivy_results.json       cache:         paths:         - .cache   Report:     # combining tools outputs into one HTML     stage: report     when: always     image: python:3.5           script:     - mkdir json     - cp $ARTIFACT_FOLDER\/*.json .\/json\/     - pip install json2html     - wget https:\/\/raw.githubusercontent.com\/shad0wrunner\/docker_cicd\/master\/convert_json_results.py     - python .\/convert_json_results.py           artifacts:         paths:         - results.html<\/code><\/pre>\n<\/div><\/div>\n<p>  \u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u043e\u0431\u0440\u0430\u0437\u044b \u0432 \u0432\u0438\u0434\u0435 .tar-\u0430\u0440\u0445\u0438\u0432\u0430 (\u043e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432 YAML \u0444\u0430\u0439\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0443\u0442\u0438\u043b\u0438\u0442)<\/p>\n<blockquote><p>NB: Trivy \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 <i>rpm<\/i> \u0438 <i>git<\/i>. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0438 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 RedHat-based \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439 \u0431\u0430\u0437\u044b \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/p><\/blockquote>\n<p>  2. \u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438 \u0432 \u043d\u0430\u0448\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435, GitLab \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430\u0447\u043d\u0451\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 CI\/CD \u2192 Pipelines \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0445\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439. <\/p>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0447\u0435\u0442\u044b\u0440\u0435 \u0437\u0430\u0434\u0430\u0447\u0438. \u0422\u0440\u0438 \u0438\u0437 \u043d\u0438\u0445 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f (Report) \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043e\u0442\u0447\u0451\u0442 \u0438\u0437 \u0440\u0430\u0437\u0440\u043e\u0437\u043d\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pz\/cp\/is\/pzcpisyzboqen0qnk93lawmo_ny.png\"><br \/>  \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Trivy \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0441\u0432\u043e\u0451 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0431\u044b\u043b\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u044b CRITICAL \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u043e\u0431\u0440\u0430\u0437\u0435 \u0438\u043b\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u0445. \u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f Hadolint \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 Success \u043a\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0441\u0431\u043e\u0440\u043a\u0438.<\/p>\n<p>  \u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u0432\u044b\u0445\u043e\u0434\u0430, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u043f\u0440\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u0438, \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u043b\u0438 \u0442\u0430\u043a\u0436\u0435 \u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0431\u043e\u0440\u043a\u0438. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0431\u043e\u0440\u043a\u0430 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 Trivy \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u0441 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u044c\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 SHOWSTOPPER \u0432 <i>.gitlab-ci.yml<\/i>.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qk\/bf\/wr\/qkbfwrpw0k4k2x4frqjs-ndzazk.png\"><\/p>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u0430\u0436\u0434\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043b\u043e\u0433\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u043a\u0430\u043d\u0438\u0440\u0443\u044e\u0449\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 json-\u0444\u0430\u0439\u043b\u0430\u0445 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 artifacts \u0438\u043b\u0438 \u0432 \u043f\u0440\u043e\u0441\u0442\u043e\u043c HTML-\u043e\u0442\u0447\u0451\u0442\u0435 (\u043e \u043d\u0435\u043c \u0447\u0443\u0442\u044c \u043d\u0438\u0436\u0435): <br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bm\/ma\/is\/bmmaisxukhkhnjzaslqcwyqhqso.png\"><\/p>\n<p>  3. \u0414\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0442\u0447\u0451\u0442\u043e\u0432 \u0443\u0442\u0438\u043b\u0438\u0442 \u0432 \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u043e\u043c \u0432\u0438\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 Python \u0434\u043b\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0442\u0440\u0451\u0445 json-\u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u043e\u0434\u0438\u043d HTML-\u0444\u0430\u0439\u043b \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 \u0434\u0435\u0444\u0435\u043a\u0442\u043e\u0432. <br \/>  \u042d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 Report, \u0430 \u0435\u0433\u043e \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u043c \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f HTML-\u0444\u0430\u0439\u043b \u0441 \u043e\u0442\u0447\u0451\u0442\u043e\u043c. \u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0442\u0430\u043a\u0436\u0435 \u043b\u0435\u0436\u0438\u0442 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0438 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u043d\u0443\u0436\u0434\u044b, \u0446\u0432\u0435\u0442\u0430 \u0438 \u0442. \u043f.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/8q\/ct\/ms\/8qctmsq0ekqsp8yh07binyrred8.png\"><\/p>\n<h3>Shell-\u0441\u043a\u0440\u0438\u043f\u0442<\/h3>\n<p>  \u0412\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c Docker-\u043e\u0431\u0440\u0430\u0437\u044b \u043d\u0435 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 CI\/CD \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u043c\u0435\u0442\u044c \u0432\u0441\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0432 \u0432\u0438\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u0445\u043e\u0441\u0442\u0435. \u042d\u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u043c shell-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 (\u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439) \u043c\u0430\u0448\u0438\u043d\u0435. \u0421\u043a\u0440\u0438\u043f\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0442\u0435 \u0436\u0435 \u0441\u0430\u043c\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u0447\u0442\u043e \u0438 \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 gitlab-runner.<\/p>\n<p>  \u0414\u043b\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d Docker \u0438 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 docker.<\/p>\n<p>  \u0421\u0430\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0437\u0434\u0435\u0441\u044c: <a href=\"https:\/\/raw.githubusercontent.com\/Swordfish-Security\/docker_cicd\/master\/docker_sec_check.sh\">docker_sec_check.sh<\/a><\/p>\n<p>  \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0444\u0430\u0439\u043b\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f, \u043a\u0430\u043a\u043e\u0439 \u043e\u0431\u0440\u0430\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u0435\u0444\u0435\u043a\u0442\u044b \u043a\u0430\u043a\u043e\u0439 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u0443\u0442\u0438\u043b\u0438\u0442\u044b Trivy \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<p>  \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0432\u0441\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0441\u043a\u0430\u0447\u0430\u043d\u044b \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <i>docker_tools<\/i>, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438\u0445 \u0440\u0430\u0431\u043e\u0442\u044b \u2014 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <i>docker_tools\/json<\/i>, \u0430 HTML \u0441 \u043e\u0442\u0447\u0451\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <i>results.html<\/i>.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">~\/docker_cicd$ .\/docker_sec_check.sh  [+] Setting environment variables [+] Installing required packages [+] Preparing necessary directories [+] Fetching sample Dockerfile 2020-10-20 10:40:00 (45.3 MB\/s) - \u2018Dockerfile\u2019 saved [8071\/8071] [+] Pulling image to scan latest: Pulling from bkimminich\/juice-shop [+] Running Hadolint ... Dockerfile:205 DL3015 Avoid additional packages by specifying `--no-install-recommends` Dockerfile:248 DL3002 Last USER should not be root ... [+] Running Dockle ... WARN    - DKL-DI-0006: Avoid latest tag         * Avoid 'latest' tag INFO    - CIS-DI-0005: Enable Content trust for Docker         * export DOCKER_CONTENT_TRUST=1 before docker pull\/build ... [+] Running Trivy juice-shop\/frontend\/package-lock.json ===================================== Total: 3 (UNKNOWN: 0, LOW: 1, MEDIUM: 0, HIGH: 2, CRITICAL: 0)  +---------------------+------------------+----------+---------+-------------------------+ |       LIBRARY       | VULNERABILITY ID | SEVERITY | VERSION |             TITLE       | +---------------------+------------------+----------+---------+-------------------------+ | object-path         | CVE-2020-15256   | HIGH     | 0.11.4  | Prototype pollution in  | |                     |                  |          |         | object-path             | +---------------------+------------------+          +---------+-------------------------+ | tree-kill           | CVE-2019-15599   |          | 1.2.2   | Code Injection          | +---------------------+------------------+----------+---------+-------------------------+ | webpack-subresource | CVE-2020-15262   | LOW      | 1.4.1   | Unprotected dynamically | |                     |                  |          |         | loaded chunks           | +---------------------+------------------+----------+---------+-------------------------+  juice-shop\/package-lock.json ============================ Total: 20 (UNKNOWN: 0, LOW: 1, MEDIUM: 6, HIGH: 8, CRITICAL: 5)  ...  juice-shop\/package-lock.json ============================ Total: 5 (CRITICAL: 5)  ... [+] Removing left-overs [+] Making the output look pretty [+] Converting JSON results [+] Writing results HTML [+] Clean exit ============================================================ [+] Everything is done. Find the resulting HTML report in results.html<\/code><\/pre>\n<\/div><\/div>\n<h3>Docker-\u043e\u0431\u0440\u0430\u0437 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u0430\u043c\u0438<\/h3>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b \u044f \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0434\u0432\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 Dockerfile \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u0430 \u0441 \u0443\u0442\u0438\u043b\u0438\u0442\u0430\u043c\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u041e\u0434\u0438\u043d Dockerfile \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u0434\u043b\u044f \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u0430 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u0432\u0442\u043e\u0440\u043e\u0439 (Dockerfile_tar) \u2014 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u0434\u043b\u044f \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f tar-\u0444\u0430\u0439\u043b\u0430 \u0441 \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<p>  1. \u0411\u0435\u0440\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 Docker \u0444\u0430\u0439\u043b \u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f <a href=\"https:\/\/github.com\/Swordfish-Security\/docker_cicd\/tree\/master\/Dockerfile\">https:\/\/github.com\/Swordfish-Security\/docker_cicd\/tree\/master\/Dockerfile<\/a>.<br \/>  2. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0435\u0433\u043e \u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0443:  <\/p>\n<pre><code class=\"bash\">docker build -t dscan:image -f docker_security.df . <\/code><\/pre>\n<p>  3. \u041f\u043e\u0441\u043b\u0435 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0438\u0437 \u043e\u0431\u0440\u0430\u0437\u0430. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f DOCKERIMAGE \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0435\u0433\u043e \u043d\u0430\u0441 \u043e\u0431\u0440\u0430\u0437\u0430 \u0438 \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c Dockerfile, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u043e\u0442\u0438\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0441 \u043d\u0430\u0448\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u043d\u0430 \u0444\u0430\u0439\u043b <i>\/Dockerfile<\/i> (\u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430):  <\/p>\n<pre><code class=\"bash\">docker run --rm -v $(pwd)\/results:\/results -v $(pwd)\/docker_security.df:\/Dockerfile -e DOCKERIMAGE=&quot;bkimminich\/juice-shop&quot; dscan:image<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\"> [+] Setting environment variables [+] Running Hadolint \/Dockerfile:3 DL3006 Always tag the version of an image explicitly [+] Running Dockle WARN    - DKL-DI-0006: Avoid latest tag         * Avoid 'latest' tag INFO    - CIS-DI-0005: Enable Content trust for Docker         * export DOCKER_CONTENT_TRUST=1 before docker pull\/build INFO    - CIS-DI-0006: Add HEALTHCHECK instruction to the container image         * not found HEALTHCHECK statement INFO    - DKL-LI-0003: Only put necessary files         * unnecessary file : juice-shop\/node_modules\/sqlite3\/Dockerfile         * unnecessary file : juice-shop\/node_modules\/sqlite3\/tools\/docker\/architecture\/linux-arm64\/Dockerfile         * unnecessary file : juice-shop\/node_modules\/sqlite3\/tools\/docker\/architecture\/linux-arm\/Dockerfile [+] Running Trivy ... juice-shop\/package-lock.json ============================ Total: 20 (UNKNOWN: 0, LOW: 1, MEDIUM: 6, HIGH: 8, CRITICAL: 5) ... [+] Making the output look pretty [+] Starting the main module ============================================================ [+] Converting JSON results [+] Writing results HTML [+] Clean exit ============================================================ [+] Everything is done. Find the resulting HTML report in results.html<\/code><\/pre>\n<p>  <\/p>\n<h1>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h1>\n<p>  \u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0443\u0442\u0438\u043b\u0438\u0442 \u0434\u043b\u044f \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u0432 Docker, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0432\u0435\u0441\u044c\u043c\u0430 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0435\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u0438 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0442\u0435 \u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u043e\u0442\u0447\u0435\u0442\u044b \u0438\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0447\u0438\u0441\u0442\u043e \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435, \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438 \u0438 \u0442. \u0434. \u041e\u0431\u0437\u043e\u0440 \u044d\u0442\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0438\u0445 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435. <\/p>\n<p>  \u041f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439 \u043d\u0430\u0431\u043e\u0440\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0438\u0441\u0430\u043d \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u0432\u0441\u0435 \u043e\u043d\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u043d\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043d\u0438\u043c\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0434 \u0432\u0430\u0448\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u0411\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e \u0432\u0441\u0435 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u044b, \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0438\u0437\u0443\u0447\u0435\u043d\u044b \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e\u0441\u0442\u044c \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445, \u043d\u043e \u044d\u0442\u043e \u0442\u0435\u043c\u0430 \u0434\u043b\u044f \u0431\u0443\u0434\u0443\u0449\u0435\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0434\u0430\u043d\u043d\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f, \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0432\u0430\u043c \u0438 \u0441\u0442\u0430\u043d\u0443\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u043a\u0430\u0441\u0430\u044e\u0449\u0435\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/swordfish_security\/blog\/524490\/\"> https:\/\/habr.com\/ru\/company\/swordfish_security\/blog\/524490\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/uj\/hj\/xj\/ujhjxjvyqkeofft-kv3k8y8nvce.png\"><br \/>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/p>\n<p>  \u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u0437-\u0437\u0430 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u044e\u0449\u0435\u0439 \u0440\u043e\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0435 \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u043c\u0435\u0441\u0442\u0435 \u0441\u0442\u043e\u0438\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044d\u0442\u0430\u043f\u043e\u0432 \u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438. \u041e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0432 \u0440\u0443\u0447\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0440\u0443\u0434\u043e\u0451\u043c\u043a\u0438\u043c \u0437\u0430\u043d\u044f\u0442\u0438\u0435\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0448\u0430\u0433\u0438 \u043a \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u043c\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438 \u0434\u043b\u044f \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0443\u0442\u0438\u043b\u0438\u0442 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 Docker \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0434\u0435\u043c\u043e-\u0441\u0442\u0435\u043d\u0434 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 Dockerfile. \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0443 \u0432\u0441\u0435\u0445 \u0440\u0430\u0437\u043d\u044b\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0438\u0436\u0435 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-311809","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/311809","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=311809"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/311809\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=311809"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=311809"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=311809"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}