Potential fix for code scanning alert no. 1: Cache Poisoning via low-privileged code injection (#2164)

Potential fix for
[https://github.com/apache/iceberg-rust/security/code-scanning/1](https://github.com/apache/iceberg-rust/security/code-scanning/1)

To fix the issue, pass `github.event.workflow_run.head_branch` into the
shell as an environment variable instead of interpolating it directly in
the script, and then reference only the environment variable inside the
`run` block. This follows the safer pattern from the “Secure Workflow”
example, where GitHub expressions are resolved into environment
variables and then treated as inert data.

Concretely, update the `Validate release tag format` step:

- Add an `env:` section with two variables:
  - `DISPATCH_RELEASE_TAG: ${{ github.event.inputs.release_tag }}`
  - `RUN_HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}`
- Replace the direct usages of `${{ github.event.inputs.release_tag }}`
and `${{ github.event.workflow_run.head_branch }}` in the shell script
with `$DISPATCH_RELEASE_TAG` and `$RUN_HEAD_BRANCH` respectively.

This change is all within `.github/workflows/release_python.yml`, in the
`validate-release-tag` job, `Validate release tag format` step. No new
methods, external definitions, or imports are required.


_Suggested fixes powered by Copilot Autofix. Review carefully before
merging._


### Tested
On fork repo github action run:
https://github.com/kevinjqliu/iceberg-rust/actions/runs/22290533306

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: blackmwk <liurenjie1024@outlook.com>
1 file changed
tree: bd4bc95a210ba33d6c9d6b759b26b1a6c2a08d3e
  1. .cargo/
  2. .devcontainer/
  3. .github/
  4. .idea/
  5. bindings/
  6. crates/
  7. dev/
  8. docs/
  9. scripts/
  10. website/
  11. .asf.yaml
  12. .gitattributes
  13. .gitignore
  14. .licenserc.yaml
  15. .taplo.toml
  16. .typos.toml
  17. Cargo.lock
  18. Cargo.toml
  19. CHANGELOG.md
  20. CONTRIBUTING.md
  21. deny.toml
  22. LICENSE
  23. Makefile
  24. NOTICE
  25. README.md
  26. rust-toolchain.toml
  27. rustfmt.toml
README.md

Apache Iceberg™ Rust

Rust implementation of Apache Iceberg™.

Components

The Apache Iceberg Rust project is composed of the following components:

NameReleaseDocs
icebergiceberg imagedocs release docs dev
iceberg-datafusioniceberg-datafusion imagedocs release docs dev
iceberg-catalog-glueiceberg-catalog-glue imagedocs release docs dev
iceberg-catalog-hmsiceberg-catalog-hms imagedocs release docs dev
iceberg-catalog-resticeberg-catalog-rest imagedocs release docs dev

Iceberg Rust Implementation Status

The features that Iceberg Rust currently supports can be found here.

Supported Rust Version

Iceberg Rust is built and tested with stable rust, and will keep a rolling MSRV (minimum supported rust version). At least three months from latest rust release is supported. MSRV is updated when we release iceberg-rust.

Check the current MSRV on crates.io.

Contribute

Apache Iceberg is an active open-source project, governed under the Apache Software Foundation (ASF). Apache Iceberg Rust is always open to people who want to use or contribute to it. Here are some ways to get involved.

The Apache Iceberg community is built on the principles described in the Apache Way and all who engage with the community are expected to be respectful, open, come with the best interests of the community in mind, and abide by the Apache Foundation Code of Conduct.

Users

  • Databend: An open-source cloud data warehouse that serves as a cost-effective alternative to Snowflake.
  • Lakekeeper: An Apache-licensed Iceberg REST Catalog with data access controls.
  • Moonlink: A Rust library that enables sub-second mirroring (CDC) of Postgres tables into Iceberg.
  • RisingWave: A Postgres-compatible SQL database designed for real-time event streaming data processing, analysis, and management.
  • Wrappers: Postgres Foreign Data Wrapper development framework in Rust.
  • ETL: Stream your Postgres data anywhere in real-time.

License

Licensed under the Apache License, Version 2.0