Skip to content

Commit

Permalink
add cve checks for all examples
Browse files Browse the repository at this point in the history
cve results will be uploaded to s3
file: cve-summary
  • Loading branch information
thomas-roos committed Oct 10, 2023
1 parent 579830a commit 5a3f3d9
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 2 deletions.
1 change: 1 addition & 0 deletions source-repo/kas/build.buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ artifacts:
discard-paths: true
files:
- $TMP_DIR/build/tmp/deploy/images/qemux86-64/aws-biga-image-qemux86-64*
- $TMP_DIR/build/tmp/log/cve/cve-summary*
2 changes: 2 additions & 0 deletions source-repo/kas/kas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ local_conf_header:
qemu-config: |
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
IMAGE_INSTALL:append = " greengrass-bin"
INHERIT += "cve-check"
include cve-extra-exclusions.inc
repos:
poky:
Expand Down
5 changes: 5 additions & 0 deletions source-repo/meta-aws-demo/build.buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ phases:
- git submodule update --init --recursive
- echo Build started on `date`
- . ./init-build-env $TMP_DIR
# Update our local conf to check for CVEs
- echo 'INHERIT += "cve-check"' >> $TMP_DIR/conf/local.conf
# this will suppress false positive CVEs
- echo 'include cve-extra-exclusions.inc' >> $TMP_DIR/conf/local.conf
- BUILD_DEVICE=qemu bitbake core-image-minimal
post_build:
commands:
Expand All @@ -30,3 +34,4 @@ artifacts:
discard-paths: true
files:
- $TMP_DIR/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64*
- $TMP_DIR/tmp/log/cve/cve-summary*
6 changes: 6 additions & 0 deletions source-repo/poky-ami/build.buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ phases:
# Update our local conf to build the EC2 AMI.
- echo 'MACHINE = "aws-ec2-arm64"' >> $TMP_DIR/conf/local.conf
- echo 'INHERIT += "aws-ec2-image"' >> $TMP_DIR/conf/local.conf
# Update our local conf to check for CVEs
- echo 'INHERIT += "cve-check"' >> $TMP_DIR/conf/local.conf
# this will suppress false positive CVEs
- echo 'include cve-extra-exclusions.inc' >> $TMP_DIR/conf/local.conf
# build the image
- bitbake core-image-minimal
- echo Build completed on `date`
post_build:
Expand All @@ -44,3 +49,4 @@ artifacts:
discard-paths: true
files:
- $TMP_DIR/tmp/deploy/images/aws-ec2-arm64/core-image-minimal*
- $TMP_DIR/tmp/log/cve/cve-summary*
6 changes: 6 additions & 0 deletions source-repo/poky/build.buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ phases:
- repo init -u $CODEBUILD_SRC_DIR -b main -m manifest.xml
- repo sync
- . poky/oe-init-build-env $TMP_DIR
# Update our local conf to check for CVEs
- echo 'INHERIT += "cve-check"' >> $TMP_DIR/conf/local.conf
# this will suppress false positive CVEs
- echo 'include cve-extra-exclusions.inc' >> $TMP_DIR/conf/local.conf
# build the image
- bitbake core-image-minimal
post_build:
commands:
Expand All @@ -29,3 +34,4 @@ artifacts:
discard-paths: true
files:
- $TMP_DIR/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64*
- $TMP_DIR/tmp/log/cve/cve-summary*
2 changes: 1 addition & 1 deletion test/__snapshots__/demo-pipeline.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6081,7 +6081,7 @@ def handler(event, context):
"BranchName": "main",
"S3": {
"Bucket": "cdk-hnb659fds-assets-12341234-eu-central-1",
"Key": "1de2dc6cbcd5d77c4571a033541f7c54c370a8404216a48e1a05fb19708f8572.zip",
"Key": "be1ef3027fcc83dcf3e6dad360bb0adeb5475cc89dd63f47af480d614cc2584c.zip",
},
},
"RepositoryName": "layer-repo-MyTestStack",
Expand Down
2 changes: 1 addition & 1 deletion test/__snapshots__/source-repo.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exports[`Demo Source Repository Snapshot 1`] = `
"BranchName": "main",
"S3": {
"Bucket": "cdk-hnb659fds-assets-12341234-eu-central-1",
"Key": "1de2dc6cbcd5d77c4571a033541f7c54c370a8404216a48e1a05fb19708f8572.zip",
"Key": "be1ef3027fcc83dcf3e6dad360bb0adeb5475cc89dd63f47af480d614cc2584c.zip",
},
},
"RepositoryName": "charlie",
Expand Down

0 comments on commit 5a3f3d9

Please sign in to comment.