You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have 3 types of dev container. These are defined under src
110
+
We have 4 types of dev container. These are defined under src
113
111
114
112
`base` - this is the base image that all others are based on.
115
113
`languages` - this installs specific versions of node and python.
116
-
`projects` - this is used for projects where more customization is needed than just a base language image
114
+
`projects` - this is used for projects where more customization is needed than just a base language image.
115
+
`githubactions` - this just takes an existing image and remaps vscode user to be 1001 so it can be used by github actions.
117
116
118
117
Each image to be built contains a .devcontainer folder that defines how the devcontainer should be built. At a minimum, this should contain a devcontainer.json file. See https://containers.dev/implementors/json_reference/ for options for this
119
118
@@ -125,13 +124,15 @@ We use trivy to scan for vulnerabilities in the built docker images. Known vulne
125
124
For each pull request, and merge to main, images are built and scanned using trivy, but the images are not pushed to github container registry
126
125
Docker images are built for each pull request, and on merges to main.
127
126
Docker images are built for amd64 and arm64 architecture, and a combined manifest is created and pushed as part of the build.
127
+
Images are also created with user vscode mapped to user id 1001 so they can be used by github actions.
128
128
129
129
The base image is built first, and then language images, and finally project images.
130
130
131
131
Docker images are scanned for vulnerabilities using trivy as part of a build step, and the build fails if vulnerabilities are found not in .trivyignore file.
132
132
133
133
For pull requests, images are tagged with the pr-<pullrequestid>-<shortcommitsha>.
134
134
For merges to main, images are tagged with the <shortcommitsha>.
135
+
Github actions images are tagged with githubactions-<tag>
135
136
136
137
When a pull request is merged to main or closed, all associated images are deleted from the registry using the github workflow delete_old_images
-`install` - placeholder target (currently not implemented)
260
+
-`install-node` - placeholder target (currently not implemented)
261
+
-`docker-build` - placeholder target (currently not implemented)
262
+
-`compile` - placeholder target (currently not implemented)
263
+
264
+
Check targets (`check.mk`)
265
+
-`lint` - placeholder target (currently not implemented)
266
+
-`test` - placeholder target (currently not implemented)
267
+
-`shellcheck` - runs shellcheck on `scripts/*.sh` and `.github/scripts/*.sh` when files exist
268
+
-`cfn-lint` - runs `cfn-lint` against `cloudformation/**/*.yml|yaml` and `SAMtemplates/**/*.yml|yaml`
269
+
-`cdk-synth` - placeholder target (currently not implemented)
270
+
-`cfn-guard-sam-templates` - validates SAM templates against cfn-guard rulesets and writes outputs to `.cfn_guard_out/`
271
+
-`cfn-guard-cloudformation` - validates `cloudformation` templates against cfn-guard rulesets and writes outputs to `.cfn_guard_out/`
272
+
-`cfn-guard-cdk` - validates `cdk.out` against cfn-guard rulesets and writes outputs to `.cfn_guard_out/`
273
+
-`cfn-guard-terraform` - validates `terraform_plans` against cfn-guard rulesets and writes outputs to `.cfn_guard_out/`
274
+
275
+
Trivy targets (`trivy.mk`)
276
+
-`trivy-license-check` - runs Trivy license scan (HIGH/CRITICAL) and writes `.trivy_out/license_scan.txt`
277
+
-`trivy-generate-sbom` - generates CycloneDX SBOM at `.trivy_out/sbom.cdx.json`
278
+
-`trivy-scan-python` - scans Python dependencies (HIGH/CRITICAL) and writes `.trivy_out/dependency_results_python.txt`
279
+
-`trivy-scan-node` - scans Node dependencies (HIGH/CRITICAL) and writes `.trivy_out/dependency_results_node.txt`
280
+
-`trivy-scan-go` - scans Go dependencies (HIGH/CRITICAL) and writes `.trivy_out/dependency_results_go.txt`
281
+
-`trivy-scan-java` - scans Java dependencies (HIGH/CRITICAL) and writes `.trivy_out/dependency_results_java.txt`
282
+
-`trivy-scan-docker` - scans a built image (HIGH/CRITICAL) and writes `.trivy_out/dependency_results_docker.txt` (requires `DOCKER_IMAGE`), for example:
0 commit comments