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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
tool: cargo-llvm-cov
- name: Measure coverage
run: |
cargo llvm-cov --no-report -p libinjectionrs --lib
cargo llvm-cov --no-report -p barbacane-libinjection --lib
cargo llvm-cov report --summary-only | tee coverage.txt
cargo llvm-cov report --lcov --output-path lcov.info
- name: Publish summary
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release

# Publishes barbacane-libinjection to crates.io when a version tag is pushed.
# The tag must match the version in Cargo.toml. Requires a CARGO_REGISTRY_TOKEN
# secret (org-level, or set on this repo).

on:
push:
tags: ['v*']

permissions:
contents: read

jobs:
publish:
name: Publish to crates.io
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false

- uses: dtolnay/rust-toolchain@stable

- name: Check tag matches Cargo.toml version
run: |
TAG="${GITHUB_REF#refs/tags/v}"
VER="$(sed -n 's/^version = "\([^"]*\)".*/\1/p' Cargo.toml | head -1)"
if [ "$TAG" != "$VER" ]; then
echo "::error::tag v$TAG does not match Cargo.toml version $VER"
exit 1
fi
echo "Publishing version $VER"

- name: Publish
run: cargo publish -p barbacane-libinjection --token "${{ secrets.CARGO_REGISTRY_TOKEN }}"
2 changes: 1 addition & 1 deletion benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ harness = false
path = "differential_bench.rs"

[dependencies]
libinjectionrs = { path = "../libinjectionrs" }
libinjectionrs = { path = "../libinjectionrs", package = "barbacane-libinjection" }
criterion.workspace = true

[build-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion comparison-bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name = "compare"
path = "src/main.rs"

[dependencies]
libinjectionrs = { path = "../libinjectionrs" }
libinjectionrs = { path = "../libinjectionrs", package = "barbacane-libinjection" }
clap = { version = "4.4", features = ["derive"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand Down
1 change: 1 addition & 0 deletions fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ libfuzzer-sys = "0.4"

[dependencies.libinjectionrs]
path = "../libinjectionrs"
package = "barbacane-libinjection"

[build-dependencies]
bindgen = "0.69"
Expand Down
2 changes: 1 addition & 1 deletion libinjection-debug/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description = "Comprehensive debugging tool for libinjection tokenization"
[workspace]

[dependencies]
libinjectionrs = { path = "../libinjectionrs" }
libinjectionrs = { path = "../libinjectionrs", package = "barbacane-libinjection" }
clap = { version = "4.0", features = ["derive"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand Down
6 changes: 3 additions & 3 deletions libinjectionrs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "libinjectionrs"
name = "barbacane-libinjection"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
description = "Rust port of libinjection - SQL/XSS injection detection library"
repository = "https://github.com/barbacane-dev/libinjectionrs"
description = "A memory-safe Rust port of libinjection (SQL injection and XSS detection), differential-tested against the C library"
readme = "README.md"
keywords = ["security", "sql-injection", "xss", "detection", "web-security"]
categories = ["web-programming", "parser-implementations"]
Expand Down
Loading