Skip to content

Commit 4e96a3b

Browse files
authored
fix: build attestations by including provenance and SBOM (#103)
1 parent 16e289b commit 4e96a3b

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/main/docker/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
#
1717
# You should have received a copy of the GNU General Public License
1818
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
20+
ARG BUILDKIT_SBOM_SCAN_STAGE=true
21+
1922
FROM docker.io/eclipse-temurin:21-jdk-alpine@sha256:2f2f553ce09d25e2d2f0f521ab94cd73f70c9b21327a29149c23a2b63b8e29a0 AS jre-build
2023

2124
# Create a custom Java runtime.

src/main/docker/docker-bake.hcl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ target "dev" {
6565
]
6666
}
6767

68-
# TODO: OWASP RULE#13 https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html#rule-13-enhance-supply-chain-security
6968
target "release" {
7069
description = "Builds the image for production purposes."
7170
args = {
@@ -96,4 +95,13 @@ target "release" {
9695
annotation("org.opencontainers.image.created", "${formatdate("YYYY-MM-DD'T'hh:mm:ss'Z'", timestamp())}"),
9796
notequal(REVISION, "") ? annotation("org.opencontainers.image.revision", REVISION) : ""
9897
]
98+
attest = [
99+
{
100+
type = "provenance",
101+
mode = "max",
102+
},
103+
{
104+
type = "sbom",
105+
}
106+
]
99107
}

0 commit comments

Comments
 (0)