Skip to content

Commit 49a4f4c

Browse files
authored
Merge branch 'main' into dependabot/maven/org.assertj-assertj-core-3.27.2
2 parents 941b711 + 394ab0c commit 49a4f4c

File tree

52 files changed

+2585
-56
lines changed

Some content is hidden

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

52 files changed

+2585
-56
lines changed

.github/workflows/build-docs.yml

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ on:
1818
- 'mkdocs.yml'
1919
- 'Makefile'
2020

21+
permissions:
22+
contents: read
23+
2124
jobs:
2225
docs:
2326
runs-on: ubuntu-latest

.github/workflows/dispatch_analytics.yml

+13-12
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,23 @@ on:
77
- cron: '0 * * * *'
88

99
permissions:
10-
id-token: write
11-
actions: read
12-
checks: read
1310
contents: read
14-
deployments: read
15-
issues: read
16-
discussions: read
17-
packages: read
18-
pages: read
19-
pull-requests: read
20-
repository-projects: read
21-
security-events: read
22-
statuses: read
2311

2412
jobs:
2513
dispatch_token:
14+
permissions:
15+
id-token: write
16+
actions: read
17+
checks: read
18+
deployments: read
19+
issues: read
20+
discussions: read
21+
packages: read
22+
pages: read
23+
pull-requests: read
24+
repository-projects: read
25+
security-events: read
26+
statuses: read
2627
concurrency:
2728
group: analytics
2829
runs-on: ubuntu-latest

.github/workflows/docs.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ on:
77
workflow_dispatch: {}
88

99
permissions:
10-
id-token: write
11-
contents: write
12-
pages: write
10+
contents: read
1311

1412
jobs:
1513
docs:
1614
runs-on: ubuntu-latest
1715
environment: Docs
16+
permissions:
17+
id-token: write
1818
steps:
1919
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
2020
- name: Set up Python
+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Scorecard supply-chain security
2+
on:
3+
# For Branch-Protection check. Only the default branch is supported. See
4+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
5+
branch_protection_rule:
6+
schedule:
7+
- cron: "0 9 * * *"
8+
push:
9+
branches: [main]
10+
workflow_dispatch:
11+
12+
permissions: read-all
13+
14+
jobs:
15+
analysis:
16+
name: Scorecard analysis
17+
runs-on: ubuntu-latest
18+
# environment: scorecard
19+
permissions:
20+
security-events: write # update code-scanning dashboard
21+
id-token: write # confirm org+repo identity before publish results
22+
23+
steps:
24+
- name: "Checkout code"
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
with:
27+
persist-credentials: false
28+
29+
- name: "Run analysis"
30+
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
31+
with:
32+
results_file: results.sarif
33+
results_format: sarif
34+
publish_results: true # publish to OSSF Scorecard REST API
35+
# repo_token: ${{ secrets.SCORECARD_TOKEN }} # read-only fine-grained token to read branch protection settings
36+
37+
- name: "Upload results"
38+
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
39+
with:
40+
name: SARIF file
41+
path: results.sarif
42+
retention-days: 5
43+
44+
# Upload the results to GitHub's code scanning dashboard.
45+
- name: "Upload to code-scanning"
46+
uses: github/codeql-action/upload-sarif@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
47+
with:
48+
sarif_file: results.sarif

.github/workflows/osv.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: OSV-Scanner
2+
3+
# Change "main" to your default branch if you use a different name, i.e. "master"
4+
on:
5+
pull_request:
6+
branches: [main]
7+
merge_group:
8+
branches: [main]
9+
workflow_dispatch: {}
10+
11+
schedule:
12+
- cron: "30 12 * * 1"
13+
# Change "main" to your default branch if you use a different name, i.e. "master"
14+
push:
15+
branches: [main]
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
scan-pr:
22+
permissions:
23+
actions: read
24+
contents: read
25+
security-events: write
26+
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@764c91816374ff2d8fc2095dab36eecd42d61638"

.github/workflows/pr_artifacts_size.yml

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ on:
2323
- 'powertools-validation/**'
2424
- 'pom.xml'
2525
- '.github/workflows/pr_artifacts_size.yml'
26+
27+
permissions:
28+
contents: read
29+
2630
jobs:
2731
codecheck:
2832
runs-on: ubuntu-latest

.github/workflows/pr_build.yml

+20-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ on:
4545
- 'pom.xml'
4646
- 'examples/pom.xml'
4747
- '.github/workflows/**'
48+
49+
permissions:
50+
contents: read
51+
4852
jobs:
4953
build-corretto:
5054
runs-on: ubuntu-latest
@@ -58,7 +62,6 @@ jobs:
5862
AWS_REGION: eu-west-1
5963
permissions:
6064
id-token: write # needed to interact with GitHub's OIDC Token endpoint.
61-
contents: read
6265
steps:
6366
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
6467
- name: Setup java
@@ -69,14 +72,30 @@ jobs:
6972
cache: 'maven'
7073
- name: Build with Maven
7174
run: mvn -B install --file pom.xml
75+
- name: Build Gradle Setup
76+
if: ${{ matrix.java == '8' }} # Gradle example can only be built on Java 8
77+
working-directory: examples/powertools-examples-core/gradle
78+
run: |
79+
curl -L -o gradle/wrapper/gradle.zip https:$(cat gradle/wrapper/gradle-wrapper.properties | grep distributionUrl | cut -d ':' -f 2)
80+
unzip gradle/wrapper/gradle.zip -d gradle/wrapper/gradle
81+
./gradle/wrapper/gradle/gradle-8.2.1/bin/gradle wrapper
7282
- name: Build Gradle Example - Java
7383
if: ${{ matrix.java == '8' }} # Gradle example can only be built on Java 8
7484
working-directory: examples/powertools-examples-core/gradle
7585
run: ./gradlew build
86+
87+
- name: Build Gradle Setup (Kotlin)
88+
if: ${{ matrix.java == '8' }} # Gradle example can only be built on Java 8
89+
working-directory: examples/powertools-examples-core/kotlin
90+
run: |
91+
curl -L -o gradle/wrapper/gradle.zip https:$(cat gradle/wrapper/gradle-wrapper.properties | grep distributionUrl | cut -d ':' -f 2)
92+
unzip gradle/wrapper/gradle.zip -d gradle/wrapper/gradle
93+
./gradle/wrapper/gradle/gradle-8.2.1/bin/gradle wrapper
7694
- name: Build Gradle Example - Kotlin
7795
if: ${{ matrix.java == '8' }} # Gradle example can only be built on Java 8
7896
working-directory: examples/powertools-examples-core/kotlin
7997
run: ./gradlew build
98+
8099
- name: Upload coverage to Codecov
81100
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1
82101
if: ${{ matrix.java == '11' }} # publish results once

.github/workflows/pr_build_v2.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ on:
4141
- 'pom.xml'
4242
- 'examples/pom.xml'
4343
- '.github/workflows/**'
44+
45+
permissions:
46+
contents: read
47+
4448
jobs:
4549
build-corretto:
4650
runs-on: ubuntu-latest
@@ -54,7 +58,6 @@ jobs:
5458
AWS_REGION: eu-west-1
5559
permissions:
5660
id-token: write # needed to interact with GitHub's OIDC Token endpoint.
57-
contents: read
5861
steps:
5962
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
6063
- name: Setup java

.github/workflows/pr_iac_lint.yml

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
- v2
1212
paths:
1313
- 'examples/**'
14+
15+
permissions:
16+
contents: read
17+
1418
jobs:
1519
linter:
1620
runs-on: ubuntu-latest

.github/workflows/publish.yml

+9
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,18 @@ on:
44
types:
55
- published
66
workflow_dispatch: {}
7+
8+
permissions:
9+
contents: read
10+
711
jobs:
812
publish:
913
runs-on: ubuntu-latest
14+
environment: Release
15+
permissions:
16+
id-token: write
17+
issues: write
18+
contents: write
1019
steps:
1120
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
1221
- name: Set up Maven Central Repository

.github/workflows/release-drafter.yml

+5
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@ on:
66
branches:
77
- main
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
update_release_draft:
1114
runs-on: ubuntu-latest
15+
permissions:
16+
id-token: write
1217
steps:
1318
- uses: release-drafter/release-drafter@569eb7ee3a85817ab916c8f8ff03a5bd96c9c83e # v5.23.0
1419
env:

.github/workflows/release-prep.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,16 @@ on:
66
description: 'Release number to upgrade to. For example X.X.X. Follow Semantic Versioning when deciding on next version.'
77
required: true
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
build:
1114
runs-on: ubuntu-latest
15+
permissions:
16+
id-token: write
17+
pull-requests: write
18+
contents: write
1219
steps:
1320
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
1421
- name: Get current date
@@ -69,12 +76,11 @@ jobs:
6976
uses: peter-evans/create-pull-request@18f7dc018cc2cd597073088f7c7591b9d1c02672 # v3.14.0
7077
with:
7178
commit-message: chore:prep release ${{ github.event.inputs.targetRelease }}
72-
token: ${{ secrets.RELEASE }}
7379
signoff: false
7480
branch: prep-release-${{ github.event.inputs.targetRelease }}
7581
delete-branch: true
7682
title: chore:Prep release ${{ github.event.inputs.targetRelease }}
7783
body: |
7884
This is automated release prep. Remember to update [CHANGELOG.md](https://github.com/aws-powertools/powertools-lambda-java/blob/prep-release-${{ github.event.inputs.targetRelease }}/CHANGELOG.md) to capture changes in this release. Please review changes carefully before merging.
7985
80-
* [ ] Updated CHANGELOG.md
86+
* [ ] Updated CHANGELOG.md

.github/workflows/run-e2e-tests-v2.yml

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ on:
2727
paths:
2828
- 'powertools-e2e-tests/**'
2929

30+
permissions:
31+
contents: read
32+
3033
jobs:
3134
e2e:
3235
runs-on: ubuntu-latest

.github/workflows/run-e2e-tests.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ on:
2727
paths:
2828
- 'powertools-e2e-tests/**'
2929

30+
permissions:
31+
contents: read
32+
3033
jobs:
3134
e2e:
3235
runs-on: ubuntu-latest
@@ -40,7 +43,6 @@ jobs:
4043
JAVA_VERSION: ${{ matrix.java }}
4144
permissions:
4245
id-token: write # needed to interact with GitHub's OIDC Token endpoint.
43-
contents: read
4446
steps:
4547
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
4648
- name: Setup java

.github/workflows/secure_workflows.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ on:
1919
paths:
2020
- ".github/workflows/**"
2121

22+
permissions:
23+
contents: read
24+
2225
jobs:
2326
enforce_pinned_workflows:
2427
name: Harden Security
2528
runs-on: ubuntu-latest
26-
permissions:
27-
contents: read # checkout code and subsequently GitHub action workflows
2829
steps:
2930
- name: Checkout code
3031
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

.github/workflows/spotbugs.yml

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
- 'powertools-test-suite/**'
2020
- 'pom.xml'
2121
- '.github/workflows/**'
22+
23+
permissions:
24+
contents: read
25+
2226
jobs:
2327
codecheck:
2428
runs-on: ubuntu-latest

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,6 @@ example/HelloWorldFunction/build
110110
.gradle
111111
build/
112112
.terraform*
113-
terraform.tfstate*
113+
terraform.tfstate*
114+
115+
powertools-idempotency/dynamodb-local-metadata.json

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ This project follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) fo
88

99
## [Unreleased]
1010

11+
## [1.19.0-SNAPSHOT] - 2025-02-25
12+
13+
<PLEASE REMEBER TO UPDATE CHANGE LOG>
14+
15+
1116
## [1.18.0] - 2023-11-16
1217

1318
### Added

0 commit comments

Comments
 (0)