Skip to content

Release 5.2.1: remove an unused dependency, document the API and publish from CI - #2

Open
noureldinawad wants to merge 14 commits into
masterfrom
chore/security-maintenance
Open

noureldinawad wants to merge 14 commits into
masterfrom
chore/security-maintenance

Conversation

@noureldinawad

@noureldinawad noureldinawad commented Nov 30, 2026 •

Copy link
Copy Markdown

Summary

This pull request prepares ilert-rust 5.2.1, a maintenance release without changes to the public API. It removes an unused dependency, declares the minimum supported Rust version, keeps credentials out of debug output and logs, adds continuous integration, and publishes releases from GitHub Actions with crates.io trusted publishing. It also documents the public API for docs.rs and updates the README to the current API.

Changes

Dependencies

  • The unused env_logger dependency is removed; a library should not choose a logging backend for its users.
  • base64 is updated from 0.22 to 0.23. It is used internally for Basic authentication.
  • All other dependencies resolve to their latest versions, and cargo-audit reports no advisories.

Package

  • rust-version = "1.88" declares the minimum supported Rust version, which is the oldest version the current dependency tree builds with; Rust 1.87 fails.
  • The license field is MIT OR Apache-2.0, matching the two license files, and LICENSE-APACHE contains the full license text. The author is ilert GmbH.
  • The crate description, keywords and categories describe the crate more precisely, and .github/ is excluded from the package.
  • Cargo.lock is committed, so CI and Dependabot use the same dependency versions. crates.io ignores it for libraries.

Security

  • The Debug output of ILert shows <redacted> instead of the API key and the password, and the Authorization header is marked as sensitive.
  • Debug log lines show heartbeat URLs without the integration key.
  • An API key or caller_agent with characters that are not allowed in an HTTP header, such as line breaks, returns an error instead of panicking.

Code

  • The code is formatted with rustfmt, without code changes.
  • The clippy findings are fixed without API changes: five unwrap_err() calls are replaced by ?. The public from_str methods and event_with_details, which takes 13 arguments, keep their signatures, with the corresponding lints allowed.
  • Every public item is documented, with a crate overview, a compiled example and the ilert logo on docs.rs. The documentation states where the API differs from the client's methods: the events API currently rejects COMMENT events, and DELETE /api/incidents/{id} is not part of the API reference.
  • examples/quickstart.rs opens an alert with events, finds it, accepts and resolves it, lists users and pings a heartbeat monitor, and stops with the status and body on any unexpected response.

CI and releases

  • CI runs on every pull request and push to master: build and tests on stable and on Rust 1.88, rustfmt, clippy and rustdoc with warnings as errors, cargo-audit, and cargo package.
  • A release is published when a vX.Y.Z tag is pushed on a commit on master. The workflow checks the tag against Cargo.toml and the default branch, runs CI, publishes with crates.io trusted publishing (OIDC, without a long-lived token), and creates the GitHub release.
  • Actions are pinned to commit SHAs, and Dependabot keeps Cargo dependencies and actions up to date.

Documentation

  • The README is rewritten for the current API; several of the previous examples no longer compiled, for example because event_with_details now takes 13 arguments. It covers installation, a quick start, configuration, the error model, heartbeat monitors and legacy heartbeats, versioning and support, and the rustc badge shows 1.88 instead of 1.13.
  • CONTRIBUTING.md, a code of conduct (Contributor Covenant 3.0), SECURITY.md with GitHub private vulnerability reporting, issue forms for bug reports and feature requests, a pull request template, and release-notes categories are added.

Testing

  • 71 unit, integration and documentation tests pass on stable (1.100) and on Rust 1.88, including new tests for the redacted Debug output and for header values with line breaks.
  • clippy and rustdoc report no warnings, rustfmt reports no changes, and cargo package builds the crate from its packaged sources.
  • cargo semver-checks against 5.2.0 passes all 229 checks and requires no semver update.
  • Every README snippet compiles against this branch.
  • The published 5.2.0 and this branch sent identical requests (method, path, query, headers and body, apart from the version in the User-Agent) for all resources against a local mock server, with identical results.
  • examples/quickstart.rs runs end to end against a test ilert account. Against the same account, 5.2.0 and this branch gave identical results for events, finding, accepting and resolving an alert, users, incidents, services, schedules, and a legacy heartbeat ping.
  • CodeQL 2.27.6 with the default code-scanning suites for Rust and GitHub Actions reports no results.
  • codespell reports no issues, all links resolve, and the issue forms validate against GitHub's schemas.

- env_logger was a dependency but unused; libraries should not pick a
  logging backend for their users. It is removed.
- base64 0.22 -> 0.23 (used internally for Basic auth only); all other
  dependencies resolve to their latest versions.
- rust-version = "1.88": the minimum the current dependency tree builds
  with (1.87 fails).
- license "MIT OR Apache-2.0", matching LICENSE-MIT and LICENSE-APACHE;
  author ilert GmbH; .github is excluded from the package; version 5.2.1.
- Cargo.lock is committed so CI and Dependabot work from the same
  dependency versions (crates.io ignores it for libraries).
No code changes. src/ilert_builders.rs is formatted in the next commit,
together with its clippy fixes.
- Five unwrap_err() calls after is_err() checks are replaced by `?`,
  with the same behaviour.
- The public from_str methods and the 14-argument event_with_details keep
  their signatures; the clippy lints for them are allowed with a comment,
  since changing them would break users.
- The file is formatted with rustfmt.
Opens an alert with events, finds it, accepts and resolves it, lists
users and pings a heartbeat monitor. Configured with environment
variables; CI compiles it with the other targets.
- ci.yml on pull requests and pushes to master: build and test on stable
  and on the minimum supported Rust version, rustfmt, clippy with
  warnings as errors, docs with warnings as errors, cargo-audit against
  the RustSec database, and cargo package.
- release.yml on vX.Y.Z tags: runs ci.yml, checks the tag against
  Cargo.toml, publishes with crates.io trusted publishing (OIDC, no
  long-lived token) and creates the GitHub release.
- Actions pinned to commit SHAs. Dependabot for Cargo and GitHub Actions,
  weekly, grouped, with a 7-day cooldown.
README: install, a quick start, configuration, events, alerts, users,
heartbeat monitors and legacy heartbeats, versioning, support and
license; the examples match the current API (the old ones no longer
compiled) and the rustc badge shows 1.88 instead of 1.13. SECURITY.md:
report vulnerabilities to security@ilert.com.
@noureldinawad noureldinawad self-assigned this Nov 30, 2026
- CONTRIBUTING.md: how to report issues, build and test, open a pull
  request, and how releases are made.
- CODE_OF_CONDUCT.md: Contributor Covenant 3.0, with reports going to
  support@ilert.com.
- Issue forms for bug reports and feature requests. Blank issues are off;
  the issue chooser links the ilert docs, ilert support and the security
  policy instead.
- A pull request template.
- .github/release.yml groups the generated release notes by label.
The ilert logo with a dark-mode variant, badges and an overview. Fixes a
typo in the 5.1.0 changelog entry.
A crate overview with a compiled example and a map of the request
builders, documentation for every public item, and the ilert logo on
docs.rs. Comments only, no code changes.
@noureldinawad noureldinawad changed the title 5.2.1: dependency cleanup, CI, crates.io trusted publishing, README for the current API Release 5.2.1: remove an unused dependency, document the API and publish from CI Nov 30, 2026
- the Debug output of ILert shows <redacted> instead of the API key and
  the password
- the Authorization header is marked as sensitive
- debug log lines show heartbeat URLs without the integration key
- an API key or caller_agent with characters that are not allowed in an
  HTTP header, such as line breaks, returns an error instead of panicking
A check job now verifies that the tag matches Cargo.toml and that the
tagged commit is on the default branch before CI runs.
- execute() also returns Err when no complete response arrived or a JSON
  body is empty or invalid; body_json needs exactly application/json
- the ilert events API currently rejects COMMENT events
- DELETE /api/incidents/{id} is not in the API reference
- GET /api/users has no role filter, so the README and the example page
  through users instead
- examples/quickstart.rs fails with the status and body on any unexpected
  status
- CONTRIBUTING: all CI checks, src/lib.rs, the v-prefixed release tags
- SECURITY.md: GitHub private vulnerability reporting
LICENSE-APACHE held only the license notice. The Apache License asks
for a copy of the license to be given to recipients.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant