Skip to content

Commit 5300901

Browse files
author
lambda-tooling+rie
committed
Update from upstream - 2026-03-18
0 parents  commit 5300901

File tree

469 files changed

+61992
-0
lines changed

Some content is hidden

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

469 files changed

+61992
-0
lines changed
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Check binaries
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 16 * * 1-5" # min h d Mo DoW / 9am PST M-F
7+
8+
permissions:
9+
issues: write
10+
11+
jobs:
12+
check-for-vulnerabilities:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
report_contents: ${{ steps.save-output.outputs.report_contents }}
16+
steps:
17+
- name: Setup python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.11'
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
with:
24+
ref: main
25+
- name: Download latest release
26+
uses: robinraju/release-downloader@v1.10
27+
with:
28+
latest: true
29+
fileName: 'aws-lambda-rie*'
30+
out-file-path: "bin"
31+
- name: Run check for vulnerabilities
32+
id: check-binaries
33+
run: |
34+
make check-binaries
35+
- if: always() && failure() # `always()` to run even if the previous step failed. Failure means that there are vulnerabilities
36+
name: Save content of the vulnerabilities report as GitHub output
37+
id: save-output
38+
run: |
39+
report_csv="$(ls -tr output.cve-bin-*.csv 2>/dev/null | tail -n1)" # last file generated
40+
if [ -z "$report_csv" ]; then
41+
echo "No file with vulnerabilities. Probably a failure in previous step."
42+
else
43+
echo "Vulnerabilities stored in $report_csv"
44+
fi
45+
final_report="${report_csv}.txt"
46+
awk -F',' '{n=split($10, path, "/"); print $2,$3,$4,$5,path[n]}' "$report_csv" | column -t > "$final_report" # make the CSV nicer
47+
echo "report_contents<<EOF" >> "$GITHUB_OUTPUT"
48+
cat "$final_report" >> "$GITHUB_OUTPUT"
49+
echo "EOF" >> "$GITHUB_OUTPUT"
50+
- if: always() && steps.save-output.outputs.report_contents
51+
name: Build new binaries and check vulnerabilities again
52+
id: check-new-version
53+
run: |
54+
mkdir ./bin2
55+
mv ./bin/* ./bin2
56+
make compile-with-docker-all
57+
latest_version=$(strings bin/aws-lambda-rie* | grep '^go1\.' | sort | uniq)
58+
echo "latest_version=$latest_version" >> "$GITHUB_OUTPUT"
59+
make check-binaries
60+
- if: always() && steps.save-output.outputs.report_contents
61+
name: Save outputs for the check with the latest build
62+
id: save-new-version
63+
run: |
64+
if [ "${{ steps.check-new-version.outcome }}" == "failure" ]; then
65+
fixed="No"
66+
else
67+
fixed="Yes"
68+
fi
69+
echo "fixed=$fixed" >> "$GITHUB_OUTPUT"
70+
- if: always() && steps.save-output.outputs.report_contents
71+
name: Create GitHub Issue indicating vulnerabilities
72+
id: create-issue
73+
uses: dacbd/create-issue-action@main
74+
with:
75+
token: ${{ github.token }}
76+
title: |
77+
CVEs found in latest RIE release
78+
body: |
79+
### CVEs found in latest RIE release
80+
```
81+
${{ steps.save-output.outputs.report_contents }}
82+
```
83+
84+
#### Are these resolved by building with the latest patch version of Go (${{ steps.check-new-version.outputs.latest_version }})?:
85+
> **${{ steps.save-new-version.outputs.fixed }}**

.github/workflows/integ-tests.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Run Integration Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- develop
7+
- main
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
go-tests:
14+
runs-on: ubuntu-latest
15+
environment:
16+
name: integ-tests
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: run go tests
20+
run: make tests-with-docker
21+
integ-tests-x86:
22+
runs-on: ubuntu-latest
23+
environment:
24+
name: integ-tests
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.11'
30+
- name: run integration tests
31+
run: make integ-tests-with-docker-x86-64
32+
integ-tests-arm64:
33+
runs-on: ubuntu-latest
34+
environment:
35+
name: integ-tests
36+
steps:
37+
- uses: actions/checkout@v4
38+
- uses: actions/setup-python@v5
39+
with:
40+
python-version: '3.11'
41+
- name: run integration tests
42+
run: make integ-tests-with-docker-arm64
43+
integ-tests-old:
44+
runs-on: ubuntu-latest
45+
environment:
46+
name: integ-tests
47+
steps:
48+
- uses: actions/checkout@v4
49+
- uses: actions/setup-python@v5
50+
with:
51+
python-version: '3.11'
52+
- name: run integration tests
53+
run: make integ-tests-with-docker-old

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
releaseVersion:
7+
description: "Version to use for the release."
8+
required: true
9+
default: "X.Y"
10+
releaseBody:
11+
description: "Information about the release"
12+
required: true
13+
default: "New release"
14+
permissions:
15+
contents: write
16+
17+
jobs:
18+
Release:
19+
environment: Release
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
ref: main
25+
- name: Set up python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: '3.11'
29+
- name: Build
30+
run: make compile-with-docker-all
31+
- name: Run Integ Tests
32+
run: |
33+
make tests-with-docker
34+
make integ-tests
35+
- name: Release
36+
uses: softprops/action-gh-release@v2
37+
with:
38+
name: Release ${{ github.event.inputs.releaseVersion }}
39+
tag_name: v${{ github.event.inputs.releaseVersion }}
40+
body: ${{ github.event.inputs.releaseBody }}
41+
files: |
42+
bin/aws-lambda-rie
43+
bin/aws-lambda-rie-arm64
44+
bin/aws-lambda-rie-x86_64
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Validate PR Branch into Main
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
validate-pr-branch:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check source branch
13+
run: |
14+
SOURCE_BRANCH="${{ github.head_ref }}"
15+
if [[ "$SOURCE_BRANCH" != "develop" ]]; then
16+
echo "Error: Only pull requests from develop branch are allowed into main"
17+
echo "Current source branch ($SOURCE_BRANCH)."
18+
exit 1
19+
fi
20+
echo "Source branch is develop - merge allowed"

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/pkg
2+
/build
3+
/bin
4+
*.swp
5+
*.iml
6+
tags
7+
.idea
8+
.DS_Store
9+
.venv

CODE_OF_CONDUCT.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## Code of Conduct
2+
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
3+
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
4+
opensource-codeofconduct@amazon.com with any additional questions or comments.

CONTRIBUTING.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Contributing Guidelines
2+
3+
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
4+
documentation, we greatly value feedback and contributions from our community.
5+
6+
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
7+
information to effectively respond to your bug report or contribution.
8+
9+
10+
## Reporting Bugs/Feature Requests
11+
12+
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
13+
14+
When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already
15+
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
16+
17+
* A reproducible test case or series of steps
18+
* The version of our code being used
19+
* Any modifications you've made relevant to the bug
20+
* Anything unusual about your environment or deployment
21+
22+
23+
## Contributing via Pull Requests
24+
This repository contains the source code and examples for the Runtime Interface Emulator. We will accept pull requests on documentation, examples, bug fixes and the Dockerfiles. We will also accept pull requests, issues and feedback on improvements to the Runtime Interface Emulator. However, our priority will be to maintain fidelity with AWS Lambda’s Runtime Interface on the cloud.
25+
26+
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
27+
28+
1. You are working against the latest source on the *main* branch.
29+
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
30+
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
31+
32+
To send us a pull request, please:
33+
34+
1. Fork the repository.
35+
2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
36+
3. Ensure local tests pass through `make integ-tests-and-compile`
37+
4. Commit to your fork using clear commit messages.
38+
5. Send us a pull request, answering any default questions in the pull request interface.
39+
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
40+
41+
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
42+
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
43+
44+
45+
## Finding contributions to work on
46+
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start.
47+
48+
49+
## Code of Conduct
50+
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
51+
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
52+
opensource-codeofconduct@amazon.com with any additional questions or comments.
53+
54+
55+
## Security issue notifications
56+
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
57+
58+
59+
## Licensing
60+
61+
See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.

0 commit comments

Comments
 (0)