Skip to content

Commit 7236084

Browse files
authored
chore: Fail verification on warnings (#766)
1 parent 61475fe commit 7236084

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

.github/workflows/library_dafny_verification.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- name: Setup .NET Core SDK '6.0.x'
4141
uses: actions/setup-dotnet@v3
4242
with:
43-
dotnet-version: "6.0.x"
43+
dotnet-version: "9.0.x"
4444

4545
- name: Setup Dafny
4646
uses: ./mpl/.github/actions/setup_dafny

AwsEncryptionSDK/dafny/AwsEncryptionSdk/src/EncryptDecrypt.dfy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ module EncryptDecryptHelpers {
652652

653653
ensures res.Success? ==>
654654
&& mpl.EncryptionMaterialsHasPlaintextDataKey(res.value).Success?
655-
&& !res.value.algorithmSuite.commitment.IDENTITY?;
655+
&& !res.value.algorithmSuite.commitment.IDENTITY?
656656

657657
ensures res.Success? ==>
658658
&& SerializableTypes.IsESDKEncryptionContext(res.value.encryptionContext)

AwsEncryptionSDK/dafny/AwsEncryptionSdk/src/MessageBody.dfy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ module MessageBody {
251251
invariant |regularFrames| == (sequenceNumber - START_SEQUENCE_NUMBER) as nat
252252
invariant |crypto.History.AESEncrypt| - |old(crypto.History.AESEncrypt)|
253253
== |regularFrames|
254-
invariant 0 < |regularFrames| ==> Seq.First(regularFrames).header == header;
254+
invariant 0 < |regularFrames| ==> Seq.First(regularFrames).header == header
255255
invariant IsMessageRegularFrames(regularFrames)
256256

257257
invariant forall i: nat, j: nat, frame: Frames.Frame, callEvent

AwsEncryptionSDK/dafny/AwsEncryptionSdk/src/Serialize/SerializableTypes.dfy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module SerializableTypes {
3030
// The AAD section is the total length|number of pairs|key|value|key|value...
3131
// The total length is uint16, so the maximum length for the keys and values
3232
// MUST be able to include the uint16 for the number of pairs.
33-
const ESDK_CANONICAL_ENCRYPTION_CONTEXT_MAX_LENGTH := UINT16_LIMIT - 2;
33+
const ESDK_CANONICAL_ENCRYPTION_CONTEXT_MAX_LENGTH := UINT16_LIMIT - 2
3434

3535
predicate method IsESDKEncryptionContext(ec: MPL.EncryptionContext) {
3636
&& |ec| < UINT16_LIMIT

AwsEncryptionSDK/dafny/AwsEncryptionSdk/src/Serialize/V2HeaderBody.dfy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ module V2HeaderBody {
176176
}
177177

178178
// version + suiteId + messageId
179-
const headerBytesToAADStart := 1 + 2 + 32;
179+
const headerBytesToAADStart := 1 + 2 + 32
180180
predicate IsV2ExpandedAADSection(
181181
buffer: ReadableBuffer
182182
)

AwsEncryptionSDK/dafny/AwsEncryptionSdk/test/TestCreateEsdkClient.dfy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module TestCreateEsdkClient {
4747
71, 110, 211, 189, 2, 48, 99, 98, 250, 36, 53, 182, 2, 204, 198, 55, 150, 51,
4848
159, 101, 231, 34, 42, 30, 57, 204, 88, 114, 138, 94, 12, 79, 52, 71, 178,
4949
34, 61, 246, 55, 163, 145, 95, 80, 61, 85, 143, 32, 0, 98, 20, 88, 251, 204, 5
50-
];
50+
]
5151

5252
method {:test} TestClientCreation() {
5353
var defaultConfig := ESDK.DefaultAwsEncryptionSdkConfig();

AwsEncryptionSDK/dafny/AwsEncryptionSdk/test/TestRequiredEncryptionContext.dfy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module TestRequiredEncryptionContext {
2424

2525
// THIS IS A TESTING RESOURCE DO NOT USE IN A PRODUCTION ENVIRONMENT
2626
const keyArn := Fixtures.keyArn
27-
const hierarchyKeyArn := Fixtures.hierarchyKeyArn;
27+
const hierarchyKeyArn := Fixtures.hierarchyKeyArn
2828
const branchKeyStoreName: DDBTypes.TableName := Fixtures.branchKeyStoreName
2929
const logicalKeyStoreName := branchKeyStoreName
3030
// These tests require a keystore populated with these keys

SharedMakefileV2.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ VERIFY_TIMEOUT := 150
1313

1414
include $(SMITHY_DAFNY_ROOT)/SmithyDafnyMakefile.mk
1515

16-
verify:DAFNY_OPTIONS=--allow-warnings --allow-external-contracts
17-
verify_single:DAFNY_OPTIONS=--allow-warnings --allow-external-contracts
18-
verify_service:DAFNY_OPTIONS=--allow-warnings --allow-external-contracts
16+
verify:DAFNY_OPTIONS=--allow-deprecation --allow-external-contracts
17+
verify_single:DAFNY_OPTIONS=--allow-deprecation --allow-external-contracts
18+
verify_service:DAFNY_OPTIONS=--allow-deprecation --allow-external-contracts
1919

2020
transpile_implementation_net: DAFNY_OPTIONS=--allow-warnings --compile-suffix --legacy-module-names --allow-external-contracts
2121
transpile_test_net: DAFNY_OPTIONS=--allow-warnings --include-test-runner --compile-suffix --legacy-module-names --allow-external-contracts

0 commit comments

Comments
 (0)