Skip to content

Commit c1263a8

Browse files
authored
Merge pull request #5 from advanced-security/update-container
feat: Update Docker image and Cargo updates
2 parents a8f9b6a + 69da0f0 commit c1263a8

File tree

4 files changed

+42
-44
lines changed

4 files changed

+42
-44
lines changed

Cargo.lock

Lines changed: 28 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ authors = ["GeekMasher"]
77
license = "MIT"
88

99
edition = "2024"
10-
rust-version = "1.85"
10+
rust-version = "1.87"
1111

1212
publish = false
1313

@@ -16,9 +16,9 @@ publish = false
1616
[dependencies]
1717
log = "0.4"
1818
env_logger = "0.11"
19-
tokio = { version = "1", features = ["full"] }
20-
anyhow = "1"
21-
thiserror = "2"
19+
tokio = { version = "1.45", features = ["full"] }
20+
anyhow = "1.0"
21+
thiserror = "2.0"
2222
dotenvy = "0.15"
2323
glob = "0.3"
2424
# Actions

Dockerfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM docker.io/library/rust:1.85-slim as builder
1+
FROM docker.io/library/rust:1.87-slim AS builder
22

33
ENV TARGET=x86_64-unknown-linux-gnu
44

@@ -9,22 +9,25 @@ COPY . .
99
# Install dependencies
1010
RUN apt-get update && \
1111
apt-get install -y --no-install-recommends pkg-config build-essential libssl-dev && \
12-
cargo build --release && \
13-
mv target/release/codeql-extractor-action target/
12+
cargo build --release --target $TARGET && \
13+
mv target/${TARGET}/release/codeql-extractor-action target/
1414

15-
FROM docker.io/library/debian:12-slim
15+
# We have to use Debian testing as the stable version has an old
16+
# version of `glibc` that doesn't work with new-ist versions of CodeQL.
17+
FROM docker.io/library/debian:testing-slim
1618
WORKDIR /app
1719

1820
COPY --from=builder /app/target/codeql-extractor-action /usr/local/bin/codeql-extractor-action
1921

20-
# Install gh CLI
22+
# Install GitHub CLI
2123
RUN apt-get update && \
22-
apt-get install -y --no-install-recommends curl git ca-certificates && \
24+
apt-get install -y curl git ca-certificates && \
2325
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && \
2426
chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg && \
2527
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null && \
2628
apt-get update && \
2729
apt-get install -y --no-install-recommends gh && \
30+
apt-get remove -y curl && \
2831
apt-get clean && \
2932
rm -rf /var/lib/apt/lists/*
3033

src/main.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,12 @@ async fn main() -> Result<()> {
195195
});
196196

197197
log::debug!("Writing SARIF file to {sarif_path:?}");
198-
if let Err(e) = std::fs::write(&sarif_path, serde_json::to_string(&sarif)?)
199-
{
198+
if let Err(e) = std::fs::write(&sarif_path, serde_json::to_string(&sarif)?) {
200199
log::error!("Failed to write SARIF file: {e}");
201200
} else {
202201
log::info!("SARIF file written successfully: {sarif_path:?}");
203202
}
204203
}
205-
206204
}
207205

208206
// Reload the database to get analysis info

0 commit comments

Comments
 (0)