Skip to content

Commit ed89b3c

Browse files
authored
fix(ci): OSSF Changes (#1769)
* Change permissions to be more granular * update to pinned deps * remove gradle wrapper * perms * perms * fix pinned deps * add gradle download * add hashes * pin to hash * update path for props file * update build script * fix path * add setup setup * build wrapper * gradle ver inc
1 parent bf91b40 commit ed89b3c

File tree

8 files changed

+280
-10
lines changed

8 files changed

+280
-10
lines changed

.github/workflows/osv.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@ on:
1515
branches: [main]
1616

1717
permissions:
18-
# Required to upload SARIF file to CodeQL. See: https://github.com/github/codeql-action/issues/2117
19-
actions: read
20-
# Require writing security events to upload SARIF file to security tab
21-
security-events: write
22-
# Only need to read contents
2318
contents: read
2419

2520
jobs:
2621
scan-pr:
27-
uses: "google/osv-scanner-action/.github/workflows/[email protected]"
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_build.yml

+7
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ jobs:
7272
cache: 'maven'
7373
- name: Build with Maven
7474
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
7582
- name: Build Gradle Example - Java
7683
if: ${{ matrix.java == '8' }} # Gradle example can only be built on Java 8
7784
working-directory: examples/powertools-examples-core/gradle

docs/Dockerfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
FROM squidfunk/mkdocs-material
2-
RUN pip install mkdocs-git-revision-date-plugin mkdocs-macros-plugin
1+
FROM squidfunk/mkdocs-material@sha256:6ffbcd0e1438f3278341e437048ba4507e7e0af70efe700dd6d8a1d76fc071dd
2+
3+
COPY requirements.txt /tmp/
4+
RUN pip install --require-hashes -r /tmp/requirements.txt

docs/requirements.in

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mkdocs-git-revision-date-plugin==0.3.2
2+
mkdocs-macros-plugin==1.3.7

docs/requirements.txt

+260
Large diffs are not rendered by default.
Binary file not shown.

examples/powertools-examples-core/gradle/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

examples/powertools-examples-core/kotlin/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)