Skip to content

add stdin support, unit tests, and security audit ci#31

Merged
thegdsks merged 4 commits intomainfrom
feat/tests-stdin-audit
Apr 15, 2026
Merged

add stdin support, unit tests, and security audit ci#31
thegdsks merged 4 commits intomainfrom
feat/tests-stdin-audit

Conversation

@thegdsks
Copy link
Copy Markdown
Member

Summary

  • 40 unit tests for parser, grade scoring, CertTime, and expiry display
  • stdin support for inspect and decode commands (sslx inspect -, sslx decode -)
  • 11 new integration tests (live TLS, JWT decode, cert/key mismatch, PEM roundtrip, stdin piping)
  • cargo-audit security check added to CI pipeline

Test plan

  • cargo test passes (101 tests)
  • cargo clippy -- -D warnings clean
  • cargo fmt --check clean
  • CI passes on all 3 platforms

Copilot AI review requested due to automatic review settings April 15, 2026 16:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds stdin support and expands test coverage for sslx, plus introduces a dependency security audit job in CI.

Changes:

  • Support reading certificate/JWT input from stdin for inspect and decode via -.
  • Add unit tests for certificate parsing, grading boundaries, expiry display, and time conversion.
  • Add new integration tests and a CI cargo-audit-based security audit job.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/integration.rs Adds integration tests including stdin piping and live-host scenarios.
src/output/mod.rs Adds unit tests for expiry_display formatting/color behavior.
src/main.rs Updates CLI help text to document stdin usage (-).
src/commands/inspect.rs Implements stdin support for inspect and factors rendering into run_certs.
src/commands/grade.rs Exposes score_to_grade for testing and adds boundary tests.
src/commands/decode.rs Implements stdin support for decode and reuses parsed certs via run_certs.
src/cert/parser.rs Adds parse_cert_data and substantial parser unit test coverage.
src/cert/mod.rs Exposes days_to_ymd for tests and adds CertTime/date conversion tests.
.github/workflows/ci.yml Adds a new security audit job to CI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/integration.rs
Comment thread tests/integration.rs
Comment thread tests/integration.rs
Comment thread tests/integration.rs
Comment thread src/commands/decode.rs
Comment thread src/cert/parser.rs Outdated
@thegdsks thegdsks merged commit 867bef4 into main Apr 15, 2026
8 checks passed
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.

2 participants