Skip to content

Commit 8254b92

Browse files
alex-chewkarkhazrobin-awsfarleyb-amazonlizroth
authored
chore: backport maintenance/doc changes and prepare release for v1.9.1 (#731)
* Add CBMC CI configuration (#709) This commit adds a configuration file for the "CBMC Proofs" CI check. This is in preparation for adding some custom check-out steps later. * Use private submodules before CI run (#711) * chore: Use continuous-integration environment for private submodule access (#714) Co-authored-by: Robin Salkeld <[email protected]> * chore: Add support policy (#720) * Upgrade CBMC proof tools: starter kit and Litani 1.10.0 (#722) * Upgrade proof tool submodules This commit advances Litani to release 1.10.0, and the starter kit to the tip-of-tree. This brings the following improvements: - Profiling - Litani measures the memory usage of the CBMC safety checking and coverage checking jobs - The dashboard includes box-and-whisker diagrams for memory use per proof - The dashboard includes a graph of how many parallel jobs are running over the whole run, making it easy to choose a CI machine with enough parallelism - It is now possible to designate particular proofs as "EXPENSIVE"; Litani runs expensive proofs serially, ensuring that they do not over-consume resources like RAM. - UI improvements - Each pipeline page includes a table of contents - Each pipeline page includes a dependency graph of the pipeline - Each job on the pipeline page has a hyperlink to that job - The terminal output is now less noisy * Change cbmc-batch.yaml to cbmc-proof.txt This makes the proof layout consistent with the starter kit, which will allow us to use a generic run script in a future commit. Putting this in commit by itself because the diff is huge and not worth reading (just moving some files and changing two lines in the runscript). * Symlink run-cbmc-proofs.py to starter kit The run script is now a symbolic link into the starter kit submodule, meaning that it will be updated whenever the starter kit is. This is done iso that E-SDK doesn't carry custom modifications to the run script unless necessary; previous commits have made the E-SDK proofs consistent with the generic starter kit conventions. * fix: Simplify / update build instructions. (#713) Co-authored-by: June Blender <[email protected]> Co-authored-by: Alex Chew <[email protected]> * fix(proof_timeout): mark high-memory proofs expensive (#710) * Removed OOM test, as OOM is no longer possible from aws allocators (#728) * chore: pin newer aws-sdk-cpp in macOS CI builds (#729) * chore: update version number and changelog for v1.9.1 * chore: update CBMC CI submodules Co-authored-by: Kareem Khazem <[email protected]> Co-authored-by: Robin Salkeld <[email protected]> Co-authored-by: Ben Farley <[email protected]> Co-authored-by: lizroth <[email protected]> Co-authored-by: June Blender <[email protected]> Co-authored-by: Justin Boswell <[email protected]>
1 parent 61f4c4c commit 8254b92

File tree

224 files changed

+371
-948
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

224 files changed

+371
-948
lines changed

.github/workflows/osx.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on: ["pull_request", "push"]
77
jobs:
88
OSX:
99
runs-on: ${{ matrix.os }}
10+
environment: continuous-integration
1011

1112
strategy:
1213
matrix:
@@ -20,13 +21,22 @@ jobs:
2021
uses: actions/checkout@v2
2122
with:
2223
submodules: recursive
24+
if: ${{ github.repository == 'aws/aws-encryption-sdk-c' }}
25+
26+
- name: Checkout PR with CI bot token
27+
uses: actions/checkout@v2
28+
with:
29+
submodules: recursive
30+
token: ${{ secrets.CI_BOT_TOKEN }}
31+
if: ${{ github.repository == 'aws/private-aws-encryption-sdk-c-staging' }}
2332

2433
- name: Checkout AWS C++ SDK
2534
uses: actions/checkout@v2
2635
with:
2736
repository: "aws/aws-sdk-cpp"
28-
ref: "1.8.32"
37+
ref: "1.9.124"
2938
path: "aws-sdk-cpp"
39+
submodules: recursive
3040

3141
- name: Install dependencies
3242
run:

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## 1.9.1 -- 2021-10-20
4+
5+
### Maintenance
6+
7+
* Add [support policy](https://github.com/aws/aws-encryption-sdk-c/blob/master/SUPPORT_POLICY.rst)
8+
* CBMC CI upgrades ([#709](https://github.com/aws/aws-encryption-sdk-c/pull/709), [#710](https://github.com/aws/aws-encryption-sdk-c/pull/710), [#711](https://github.com/aws/aws-encryption-sdk-c/pull/711), [#722](https://github.com/aws/aws-encryption-sdk-c/pull/722), [#726](https://github.com/aws/aws-encryption-sdk-c/pull/726))
9+
* Simplify / update build instructions ([#713](https://github.com/aws/aws-encryption-sdk-c/pull/713))
10+
* Remove OOM test, as OOM is no longer possible from aws allocators ([#728](https://github.com/aws/aws-encryption-sdk-c/pull/728))
11+
* Pin newer aws-sdk-cpp in macOS CI builds ([#729](https://github.com/aws/aws-encryption-sdk-c/pull/729))
12+
313
## 1.9.0 -- 2021-05-27
414

515
* Improvements to the message decryption process.

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ set(PROJECT_NAME aws-encryption-sdk)
5151
# Version number of the SDK to be consumed by C code and Doxygen
5252
set(MAJOR 1)
5353
set(MINOR 9)
54-
set(PATCH 0)
54+
set(PATCH 1)
5555

5656
# Compiler feature tests and feature flags
5757
set(USE_ASM TRUE

README.md

+69-190
Large diffs are not rendered by default.

SUPPORT_POLICY.rst

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Overview
2+
========
3+
This page describes the support policy for the AWS Encryption SDK. We regularly provide the AWS Encryption SDK with updates that may contain support for new or updated APIs, new features, enhancements, bug fixes, security patches, or documentation updates. Updates may also address changes with dependencies, language runtimes, and operating systems.
4+
5+
We recommend users to stay up-to-date with Encryption SDK releases to keep up with the latest features, security updates, and underlying dependencies. Continued use of an unsupported SDK version is not recommended and is done at the user’s discretion
6+
7+
8+
Major Version Lifecycle
9+
========================
10+
The AWS Encryption SDK follows the same major version lifecycle as the AWS SDK. For details on this lifecycle, see `AWS SDKs and Tools Maintenance Policy`_.
11+
12+
Version Support Matrix
13+
======================
14+
This table describes the current support status of each major version of the AWS Encryption SDK for C. It also shows the next status each major version will transition to, and the date at which that transition will happen.
15+
16+
.. list-table::
17+
:widths: 30 50 50 50
18+
:header-rows: 1
19+
20+
* - Major version
21+
- Current status
22+
- Next status
23+
- Next status date
24+
* - 1.x
25+
- Maintenance
26+
- End of Support
27+
- 2022-07-08
28+
* - 2.x
29+
- Generally Available
30+
-
31+
-
32+
33+
.. _AWS SDKs and Tools Maintenance Policy: https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle

aws-encryption-sdk-cpp/tests/unit/t_cpputils.cpp

-27
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,6 @@ using namespace Aws::Cryptosdk::Testing;
2424

2525
const char *TEST_STRING = "Hello World!";
2626

27-
static void *s_bad_malloc(struct aws_allocator *allocator, size_t size) {
28-
return NULL;
29-
}
30-
31-
static void s_bad_free(struct aws_allocator *allocator, void *ptr) {}
32-
33-
static void *s_bad_realloc(struct aws_allocator *allocator, void *ptr, size_t oldsize, size_t newsize) {
34-
return NULL;
35-
}
36-
37-
static struct aws_allocator default_bad_allocator = { s_bad_malloc, s_bad_free, s_bad_realloc };
38-
39-
struct aws_allocator *t_aws_bad_allocator() {
40-
return &default_bad_allocator;
41-
}
42-
4327
int awsStringFromCAwsByteBuf_validInputs_returnAwsString() {
4428
struct aws_byte_buf b = aws_byte_buf_from_c_str(TEST_STRING);
4529
Aws::String b_string = aws_string_from_c_aws_byte_buf(&b);
@@ -143,16 +127,6 @@ int appendKeyToEdks_appendSingleElement_elementIsAppended() {
143127
return 0;
144128
}
145129

146-
int appendKeyToEdks_allocatorThatDoesNotAllocateMemory_returnsOomError() {
147-
struct aws_allocator *oom_allocator = t_aws_bad_allocator();
148-
EdksTestData ed;
149-
TEST_ASSERT_ERROR(
150-
AWS_ERROR_OOM,
151-
t_append_c_str_key_to_edks(
152-
oom_allocator, &ed.edks.encrypted_data_keys, &ed.enc, ed.data_key_id, ed.key_provider));
153-
return 0;
154-
}
155-
156130
int appendKeyToEdks_multipleElementsAppended_elementsAreAppended() {
157131
EdksTestData ed1;
158132
EdksTestData ed2("enc2", "dk2", "kp2");
@@ -234,7 +208,6 @@ int main() {
234208
RUN_TEST(awsStringFromCAwsByteBuf_validInputs_returnAwsString());
235209
RUN_TEST(awsUtilsByteBufferFromCAwsByteBuf_validInputs_returnAwsUtils());
236210
RUN_TEST(appendKeyToEdks_appendSingleElement_elementIsAppended());
237-
RUN_TEST(appendKeyToEdks_allocatorThatDoesNotAllocateMemory_returnsOomError());
238211
RUN_TEST(appendKeyToEdks_multipleElementsAppended_elementsAreAppended());
239212
RUN_TEST(awsStringFromCAwsString_validInputs_returnAwsString());
240213
RUN_TEST(awsMapFromCAwsHashHable_hashMap_returnAwsMap());

cbmc-ci/ci-config.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Configuration for the "CBMC Proofs" CI
2+
#
3+
# What the CI should do, depending on what branch the pull request
4+
# targets. This is a list of branch names (or '*' as a wildcard that
5+
# matches all branches), with an associated action. Actions can be:
6+
#
7+
# name: run-proofs
8+
#
9+
# or
10+
#
11+
# name: skip
12+
# message: "A message to post to GitHub about why the branch was skipped"
13+
# status: <"success"|"failure">
14+
# (whether the GitHub status check should succeed or fail)
15+
#
16+
behaviors:
17+
18+
- target-branches:
19+
- '*'
20+
action:
21+
name: run-proofs
22+
23+
24+
checkout-script:
25+
# If this is the private version of the repository, we need to pull in
26+
# the private versions of the submodules.
27+
- "echo Originating GitHub repository: ${GITHUB_REPOSITORY}"
28+
- ./switch-private-submodules --verbose env

switch-private-submodules

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
#!/usr/bin/env python3
2+
#
3+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License"). You
6+
# may not use this file except in compliance with the License. A copy of
7+
# the License is located at
8+
#
9+
# http://aws.amazon.com/apache2.0/
10+
#
11+
# or in the "license" file accompanying this file. This file is
12+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
13+
# ANY KIND, either express or implied. See the License for the specific
14+
# language governing permissions and limitations under the License.
15+
16+
17+
import argparse
18+
import logging
19+
import os
20+
import subprocess
21+
import sys
22+
23+
24+
DESCRIPTION = "Switch between public and private versions of submodules"
25+
26+
MODULES = [{
27+
"submodule": "aws-encryption-sdk-cpp/tests/test_vectors/aws-encryption-sdk-test-vectors",
28+
"private": "https://github.com/awslabs/private-aws-encryption-sdk-test-vectors-staging.git",
29+
"public": "https://github.com/awslabs/aws-encryption-sdk-test-vectors.git",
30+
}, {
31+
"submodule": "aws-encryption-sdk-specification",
32+
"private": "https://github.com/awslabs/private-aws-encryption-sdk-specification-staging.git",
33+
"public": "https://github.com/awslabs/aws-encryption-sdk-specification.git",
34+
}]
35+
36+
37+
def switch_to(version):
38+
logging.info("Switching to %s version of the submodules", version)
39+
for module in MODULES:
40+
cmd = [
41+
"git", "config",
42+
f'url."{module[version]}".insteadOf',
43+
module["public"],
44+
]
45+
logging.info(" ".join(cmd))
46+
subprocess.run(cmd, check=True)
47+
48+
subprocess.run(["git", "submodule", "sync"], check=True)
49+
subprocess.run([
50+
"git", "submodule", "update", "--init", "--recursive", "--checkout"],
51+
check=True)
52+
53+
54+
def switch_to_env(_):
55+
repo = os.getenv("GITHUB_REPOSITORY")
56+
if not repo:
57+
logging.error(
58+
"Could not determine which submodules to check out "
59+
"($GITHUB_REPOSITORY is not set).")
60+
sys.exit(1)
61+
62+
if repo == "aws/private-aws-encryption-sdk-c-staging":
63+
switch_to("private")
64+
else:
65+
switch_to("public")
66+
67+
68+
OPERATIONS = {
69+
"public": switch_to,
70+
"private": switch_to,
71+
"env": switch_to_env,
72+
}
73+
74+
75+
def main():
76+
pars = argparse.ArgumentParser(description=DESCRIPTION)
77+
for arg in [{
78+
"flags": ["operation"],
79+
"choices": list(OPERATIONS.keys()),
80+
"default": "public",
81+
"help": "Switch to public or private versions of the submodules, "
82+
"or decide which by reading the $GITHUB_REPOSITORY "
83+
"environment variable. Default: %(default)s."
84+
}, {
85+
"flags": ["-v", "--verbose"],
86+
"action": "store_true",
87+
"help": "verbose output",
88+
}]:
89+
flags = arg.pop("flags")
90+
pars.add_argument(*flags, **arg)
91+
args = pars.parse_args()
92+
93+
fmt = "switch-private-submodules: %(message)s"
94+
if args.verbose:
95+
logging.basicConfig(format=fmt, level=logging.INFO)
96+
else:
97+
logging.basicConfig(format=fmt, level=logging.WARNING)
98+
99+
OPERATIONS[args.operation](args.operation)
100+
101+
102+
if __name__ == "__main__":
103+
main()

verification/cbmc/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ proofs/**/logs
33
proofs/**/gotos
44
proofs/**/report
55
proofs/**/html
6+
proofs/output
67

78
# Emitted by CBMC Viewer
89
TAGS-*

verification/cbmc/jobs_dontrun/aws_cryptosdk_hdr_clean_up/cbmc-batch.yaml

-17
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This file marks the directory as containing a CBMC proof

verification/cbmc/jobs_dontrun/aws_cryptosdk_hdr_size/cbmc-batch.yaml

-17
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This file marks the directory as containing a CBMC proof

verification/cbmc/jobs_dontrun/aws_cryptosdk_hdr_write/cbmc-batch.yaml

-17
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This file marks the directory as containing a CBMC proof

verification/cbmc/jobs_dontrun/hdr_zeroize/cbmc-batch.yaml

-17
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This file marks the directory as containing a CBMC proof

verification/cbmc/proofs/aws_cryptosdk_aes_gcm_decrypt/cbmc-batch.yaml

-4
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This file marks the directory as containing a CBMC proof

verification/cbmc/proofs/aws_cryptosdk_aes_gcm_encrypt/cbmc-batch.yaml

-4
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This file marks the directory as containing a CBMC proof

verification/cbmc/proofs/aws_cryptosdk_alg_props/cbmc-batch.yaml

-4
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This file marks the directory as containing a CBMC proof

verification/cbmc/proofs/aws_cryptosdk_cmm_base_init/cbmc-batch.yaml

-4
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This file marks the directory as containing a CBMC proof

verification/cbmc/proofs/aws_cryptosdk_cmm_decrypt_materials/cbmc-batch.yaml

-4
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This file marks the directory as containing a CBMC proof

verification/cbmc/proofs/aws_cryptosdk_cmm_generate_enc_materials/cbmc-batch.yaml

-4
This file was deleted.

0 commit comments

Comments
 (0)