Skip to content

Commit 92c0532

Browse files
committed
[dnm] debug hardening failure
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
1 parent 107f4f0 commit 92c0532

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

test/hardening.bats

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ function teardown() {
3535
NEW_IMAGE="$(setup_tmpdir)"
3636
cp -rT "$IMAGE" "$NEW_IMAGE"
3737

38+
# For debugging.
39+
sha256sum "$NEW_IMAGE/$blob"
40+
ls -la "$NEW_IMAGE/$blob"
41+
3842
blobHash="$(basename "$blob")" # sha256
3943

4044
# Corrupt our blob such that the digest is changed within the expected
@@ -58,6 +62,10 @@ function teardown() {
5862
;;
5963
esac
6064

65+
# For debugging.
66+
sha256sum "$NEW_IMAGE/$blob"
67+
ls -la "$NEW_IMAGE/$blob"
68+
6169
# Now let's try to extract it.
6270
new_bundle_rootfs
6371
umoci unpack --image "${NEW_IMAGE}:${TAG}" "$BUNDLE"
@@ -77,7 +85,9 @@ function teardown() {
7785
NEW_IMAGE="$(setup_tmpdir)"
7886
cp -rT "$IMAGE" "$NEW_IMAGE"
7987

80-
blobHash="$(basename "$blob")" # sha256
88+
# For debugging.
89+
sha256sum "$NEW_IMAGE/$blob"
90+
ls -la "$NEW_IMAGE/$blob"
8191

8292
# Corrupt our blob such that the length is changed, and the length
8393
# issue will be triggered (this means the prefix-digest or whole-file
@@ -98,6 +108,10 @@ function teardown() {
98108
# of descriptors. Though this might be quite hard to do in a
99109
# comprehensive way with jq.
100110

111+
# For debugging.
112+
sha256sum "$NEW_IMAGE/$blob"
113+
ls -la "$NEW_IMAGE/$blob"
114+
101115
# Now let's try to extract it.
102116
new_bundle_rootfs
103117
umoci unpack --image "${NEW_IMAGE}:${TAG}" "$BUNDLE"

0 commit comments

Comments
 (0)