Skip to content
Merged
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
59 changes: 28 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors = ["GeekMasher"]
license = "MIT"

edition = "2024"
rust-version = "1.85"
rust-version = "1.87"

publish = false

Expand All @@ -16,9 +16,9 @@ publish = false
[dependencies]
log = "0.4"
env_logger = "0.11"
tokio = { version = "1", features = ["full"] }
anyhow = "1"
thiserror = "2"
tokio = { version = "1.45", features = ["full"] }
anyhow = "1.0"
thiserror = "2.0"
dotenvy = "0.15"
glob = "0.3"
# Actions
Expand Down
15 changes: 9 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/library/rust:1.85-slim as builder
FROM docker.io/library/rust:1.87-slim AS builder

ENV TARGET=x86_64-unknown-linux-gnu

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

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

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

# Install gh CLI
# Install GitHub CLI
RUN apt-get update && \
apt-get install -y --no-install-recommends curl git ca-certificates && \
apt-get install -y curl git ca-certificates && \
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && \
chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg && \
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 && \
apt-get update && \
apt-get install -y --no-install-recommends gh && \
apt-get remove -y curl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

Expand Down
4 changes: 1 addition & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,12 @@ async fn main() -> Result<()> {
});

log::debug!("Writing SARIF file to {sarif_path:?}");
if let Err(e) = std::fs::write(&sarif_path, serde_json::to_string(&sarif)?)
{
if let Err(e) = std::fs::write(&sarif_path, serde_json::to_string(&sarif)?) {
log::error!("Failed to write SARIF file: {e}");
} else {
log::info!("SARIF file written successfully: {sarif_path:?}");
}
}

}

// Reload the database to get analysis info
Expand Down
Loading