Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 107 additions & 0 deletions .github/workflows/security.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: Security Scan

on:
pull_request:
branches: ["**"]
push:
branches: [main, develop]
schedule:
- cron: "0 8 * * 1" # weekly Monday 08:00 UTC

permissions:
contents: read
security-events: write

jobs:
codeql:
name: CodeQL (Java SAST)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up JDK 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: temurin
java-version: "21"

- name: Initialize CodeQL
uses: github/codeql-action/init@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4.35.5
with:
languages: java
queries: +security-extended

- name: Build with Maven
run: ./mvnw -B compile -DskipTests -pl ice,ice-rest-catalog

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4.35.5
with:
category: "/language:java"

trivy:
name: Trivy Filesystem Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Run Trivy (table output for logs)
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
with:
scan-type: fs
scan-ref: .
scanners: vuln
severity: CRITICAL,HIGH
exit-code: "1"
format: table
trivy-config: trivy.yaml

- name: Run Trivy (SARIF for GitHub Security tab)
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
if: always()
with:
scan-type: fs
scan-ref: .
scanners: vuln
severity: CRITICAL,HIGH
exit-code: "0"
format: sarif
output: trivy-results.sarif
trivy-config: trivy.yaml

- name: Upload Trivy SARIF to GitHub Security
uses: github/codeql-action/upload-sarif@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4.35.5
if: always()
with:
sarif_file: trivy-results.sarif

grype:
name: Grype Dependency Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Run Grype (table output for logs)
uses: anchore/scan-action@e1165082ffb1fe366ebaf02d8526e7c4989ea9d2 # v7.4.0
with:
path: .
fail-build: "true"
severity-cutoff: high
output-format: table

- name: Run Grype (SARIF for GitHub Security tab)
uses: anchore/scan-action@e1165082ffb1fe366ebaf02d8526e7c4989ea9d2 # v7.4.0
if: always()
id: grype-sarif
with:
path: .
fail-build: "false"
severity-cutoff: high
output-format: sarif

- name: Upload Grype SARIF to GitHub Security
uses: github/codeql-action/upload-sarif@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4.35.5
if: always()
with:
sarif_file: ${{ steps.grype-sarif.outputs.sarif }}
category: grype
20 changes: 16 additions & 4 deletions ice-rest-catalog/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<properties>
<sqlite.version>3.46.1.0</sqlite.version>
<jetcd.version>0.8.5</jetcd.version>
<grpc.version>1.70.0</grpc.version>
<grpc.version>1.76.0</grpc.version>
<testcontainers.version>1.21.4</testcontainers.version>
</properties>

Expand Down Expand Up @@ -154,7 +154,7 @@
<!-- transitive -->
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.17.1</version>
<version>${commons.codec.version}</version>
</dependency>
<!-- s3tables -->
<dependency>
Expand Down Expand Up @@ -230,7 +230,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>2.43.1</version>
<version>${google.cloud.storage.version}</version>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
Expand Down Expand Up @@ -399,6 +399,18 @@
<artifactId>jetcd-core</artifactId>
<version>${jetcd.version}</version>
<exclusions>
<exclusion>
<groupId>io.grpc</groupId>
<artifactId>grpc-core</artifactId>
</exclusion>
<exclusion>
<groupId>io.grpc</groupId>
<artifactId>grpc-util</artifactId>
</exclusion>
<exclusion>
<groupId>io.grpc</groupId>
<artifactId>grpc-grpclb</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down Expand Up @@ -477,7 +489,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>33.4.0-jre</version>
<version>33.5.0-jre</version>
<exclusions>
<exclusion>
<groupId>org.checkerframework</groupId>
Expand Down
2 changes: 1 addition & 1 deletion ice-rest-catalog/src/test/pyiceberg/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ requires-python = ">=3.12"
dependencies = [
"httpx>=0.28.1",
"pyarrow>=19.0.1",
"pyiceberg[pyarrow]>=0.9.0",
"pyiceberg[pyarrow]>=0.11.1",
]

[dependency-groups]
Expand Down
Loading
Loading