Skip to content

fix(otel): harden tracing to prevent sensitive data leakage#97

Merged
naa0yama merged 3 commits intomainfrom
fix/otel-sensitive-data
Mar 16, 2026
Merged

fix(otel): harden tracing to prevent sensitive data leakage#97
naa0yama merged 3 commits intomainfrom
fix/otel-sensitive-data

Conversation

@naa0yama
Copy link
Copy Markdown
Owner

@naa0yama naa0yama commented Mar 16, 2026

概要

  • GPG stderr のログレベルを trace に引き下げ、フィンガープリント・鍵 ID・メールアドレスが OTel スパン経由で漏洩するのを防止
  • 鍵数メタデータのログレベルを info から debug に変更し、デフォルト設定での不要な情報公開を抑制
  • shim.rs にトレーシング未初期化の理由と args ログの安全性に関するセキュリティコメントを追加
  • main.rs の OTel 設定に process.command_args / process.environment リソース属性を追加してはならない旨のコメントを追加
  • devcontainer の forwardPortsportsAttributes / otherPortsAttributes に置換し、autoForwardPortsSourceprocess に変更
  • postStartCommand.sh から Jaeger のバックグラウンド実行(&)を削除
  • Jaeger UI のブラウザタブタイトルにプロジェクト名を表示するカスタマイズ機能を追加(generate-jaeger-ui-config.sh + jaeger-ui.js)

テスト計画

  • mise run test — 全 138 テスト通過
  • mise run pre-commit — fmt, clippy:strict, ast-grep 通過
  • RUST_LOG=info で機密情報が出力されないことを手動確認
  • RUST_LOG=trace で GPG stderr が trace レベルでのみ出力されることを確認
  • devcontainer rebuild 後に Jaeger UI タイトルが「Jaeger UI (chezmage)」と表示されることを確認

Code Metrics Report

Coverage Code to Test Ratio Test Execution Time
95.0% 1:0.1 13s

Code coverage of files in pull request scope (93.0%)

Files Coverage
src/gpg.rs 76.6%
src/main.rs 86.9%
src/shim.rs 89.9%
src/wrapper.rs 97.7%

Reported by octocov

Demote GPG stderr and key-count metadata to trace/debug level so
fingerprints, key IDs, and email addresses are not exported via OTel
spans. Add SECURITY comments to shim.rs (tracing must stay
uninitialized) and main.rs (do not add process resource detectors).
Forward port 16686 for Jaeger UI access and disable automatic port
forwarding to avoid exposing unintended services.
@github-actions

This comment has been minimized.

…customization

Replace forwardPorts with portsAttributes for fine-grained control,
switch autoForwardPortsSource to process, and add a generate script
that customizes the Jaeger browser tab title with the project name
from Cargo.toml.
@github-actions
Copy link
Copy Markdown
Contributor

Code Metrics Report

Coverage Code to Test Ratio Test Execution Time
95.0% 1:0.1 13s

Code coverage of files in pull request scope (93.0%)

Files Coverage
src/gpg.rs 76.6%
src/main.rs 86.9%
src/shim.rs 89.9%
src/wrapper.rs 97.7%

Reported by octocov

@naa0yama naa0yama enabled auto-merge (squash) March 16, 2026 06:32
@naa0yama naa0yama merged commit 40ee750 into main Mar 16, 2026
19 checks passed
@naa0yama naa0yama deleted the fix/otel-sensitive-data branch March 16, 2026 06:33
@github-actions github-actions Bot mentioned this pull request Mar 16, 2026
naa0yama pushed a commit that referenced this pull request Mar 16, 2026
<!-- Release notes generated using configuration in .github/release.yml
at main -->

## What's Changed
### Documentation 🗒️
* refactor(skills): apply boilerplate-rust template to skills hierarchy
by @naa0yama in #91
### Dependency Updates 📦
* chore(deps): update taiki-e/install-action action to v2.68.1 by
@renovate[bot] in #45
* chore(deps): update taiki-e/install-action action to v2.68.2 by
@renovate[bot] in #47
* chore(deps): update dependency usage to v2.17.4 by @renovate[bot] in
#48
* chore(deps): update taiki-e/install-action action to v2.68.3 by
@renovate[bot] in #50
* chore(deps): update taiki-e/install-action action to v2.68.4 by
@renovate[bot] in #51
* chore(deps): update github/codeql-action action to v4.32.4 by
@renovate[bot] in #52
* chore(deps): update taiki-e/install-action action to v2.68.5 by
@renovate[bot] in #53
* chore(deps): update taiki-e/install-action action to v2.68.6 by
@renovate[bot] in #54
* chore(deps): update taiki-e/install-action action to v2.68.7 by
@renovate[bot] in #55
* chore(deps): update actions/attest-build-provenance action to v3 by
@renovate[bot] in #13
* chore(deps): update taiki-e/install-action action to v2.68.8 by
@renovate[bot] in #58
* chore(deps): update jdx/mise-action digest to e79ddf6 by
@renovate[bot] in #59
* chore(deps): update rust crate tempfile to v3.26.0 by @renovate[bot]
in #61
* chore(deps): update taiki-e/install-action action to v2.68.9 by
@renovate[bot] in #65
* chore(deps): update dependency usage to v2.18.1 by @renovate[bot] in
#64
* chore(deps): update songmu/tagpr action to v1.17.1 by @renovate[bot]
in #66
* chore(deps): update taiki-e/install-action action to v2.68.10 by
@renovate[bot] in #68
* chore(deps): update taiki-e/install-action action to v2.68.11 by
@renovate[bot] in #69
* chore(deps): update taiki-e/install-action action to v2.68.12 by
@renovate[bot] in #70
* chore(deps): update all action update by @renovate[bot] in
#71
* chore(deps): update taiki-e/install-action action to v2.68.14 by
@renovate[bot] in #72
* chore(deps): update taiki-e/install-action action to v2.68.15 by
@renovate[bot] in #73
* chore(deps): update actions-rust-lang/setup-rust-toolchain action to
v1.15.3 by @renovate[bot] in
#74
* chore(deps): update dependency usage to v2.18.2 by @renovate[bot] in
#75
* chore(deps): update taiki-e/install-action action to v2.68.16 by
@renovate[bot] in #76
* chore(deps): update github/codeql-action action to v4.32.5 by
@renovate[bot] in #78
* chore(deps): update taiki-e/install-action action to v2.68.17 by
@renovate[bot] in #79
* chore(deps): update dependency github:rust-secure-code/cargo-auditable
to v0.7.3 by @renovate[bot] in
#80
* chore(deps): update taiki-e/install-action action to v2.68.18 by
@renovate[bot] in #81
* chore(deps): update rust docker tag to v1.93.1 by @renovate[bot] in
#82
* chore(deps): update taiki-e/install-action action to v2.68.19 by
@renovate[bot] in #85
* chore(deps): update github/codeql-action action to v4.32.6 by
@renovate[bot] in #86
* chore(deps): update taiki-e/install-action action to v2.68.20 by
@renovate[bot] in #87
* chore(deps): update taiki-e/install-action action to v2.68.21 by
@renovate[bot] in #88
* chore(deps): update taiki-e/install-action action to v2.68.22 by
@renovate[bot] in #89
* chore(deps): update taiki-e/install-action action to v2.68.23 by
@renovate[bot] in #90
* chore(deps): update dependency github:rust-secure-code/cargo-auditable
to v0.7.4 by @renovate[bot] in
#83
* chore(deps): update dependency aqua:ast-grep/ast-grep to v0.41.0 by
@renovate[bot] in #57
* chore(deps): update dependency dprint to v0.52.0 by @renovate[bot] in
#67
* chore(deps): update all action update (major) by @renovate[bot] in
#60
* chore(deps): update all action update by @renovate[bot] in
#94
* chore(deps): update taiki-e/install-action action to v2.68.25 by
@renovate[bot] in #95
* chore(deps): update zizmorcore/zizmor-action action to v0.5.2 by
@renovate[bot] in #96
### Other Changes
* chore: backport-2 by @naa0yama in
#56
* feat(deps): cargo target cleanup by @naa0yama in
#62
* chore: claude skills update by @naa0yama in
#63
* Change command to postVersionCommand in .tagpr by @naa0yama in
#77
* Update PATH export logic in Dockerfile by @naa0yama in
#84
* Update postStartCommand.sh by @naa0yama in
#92
* Update initializeCommand.sh by @naa0yama in
#93
* fix(otel): harden tracing to prevent sensitive data leakage by
@naa0yama in #97
* fix(ci): replace softprops/action-gh-release with gh CLI by @naa0yama
in #98
* Update release.yml by @naa0yama in
#99


**Full Changelog**:
v0.3.0...tagpr-from-v0.3.0

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This was referenced Mar 16, 2026
naa0yama pushed a commit that referenced this pull request Mar 16, 2026
<!-- Release notes generated using configuration in .github/release.yml
at main -->

## What's Changed
### Documentation 🗒️
* refactor(skills): apply boilerplate-rust template to skills hierarchy
by @naa0yama in #91
### Dependency Updates 📦
* chore(deps): update rust crate tempfile to v3.26.0 by @renovate[bot]
in #61
### Development Environment 🔧
* chore(deps): update taiki-e/install-action action to v2.68.1 by
@renovate[bot] in #45
* chore(deps): update taiki-e/install-action action to v2.68.2 by
@renovate[bot] in #47
* chore(deps): update dependency usage to v2.17.4 by @renovate[bot] in
#48
* chore(deps): update taiki-e/install-action action to v2.68.3 by
@renovate[bot] in #50
* chore(deps): update taiki-e/install-action action to v2.68.4 by
@renovate[bot] in #51
* chore(deps): update github/codeql-action action to v4.32.4 by
@renovate[bot] in #52
* chore(deps): update taiki-e/install-action action to v2.68.5 by
@renovate[bot] in #53
* chore(deps): update taiki-e/install-action action to v2.68.6 by
@renovate[bot] in #54
* chore(deps): update taiki-e/install-action action to v2.68.7 by
@renovate[bot] in #55
* chore: backport-2 by @naa0yama in
#56
* chore(deps): update actions/attest-build-provenance action to v3 by
@renovate[bot] in #13
* chore(deps): update taiki-e/install-action action to v2.68.8 by
@renovate[bot] in #58
* chore(deps): update jdx/mise-action digest to e79ddf6 by
@renovate[bot] in #59
* feat(deps): cargo target cleanup by @naa0yama in
#62
* chore(deps): update taiki-e/install-action action to v2.68.9 by
@renovate[bot] in #65
* chore(deps): update dependency usage to v2.18.1 by @renovate[bot] in
#64
* chore(deps): update songmu/tagpr action to v1.17.1 by @renovate[bot]
in #66
* chore(deps): update taiki-e/install-action action to v2.68.10 by
@renovate[bot] in #68
* chore(deps): update taiki-e/install-action action to v2.68.11 by
@renovate[bot] in #69
* chore(deps): update taiki-e/install-action action to v2.68.12 by
@renovate[bot] in #70
* chore(deps): update all action update by @renovate[bot] in
#71
* chore(deps): update taiki-e/install-action action to v2.68.14 by
@renovate[bot] in #72
* chore(deps): update taiki-e/install-action action to v2.68.15 by
@renovate[bot] in #73
* chore(deps): update actions-rust-lang/setup-rust-toolchain action to
v1.15.3 by @renovate[bot] in
#74
* chore(deps): update dependency usage to v2.18.2 by @renovate[bot] in
#75
* chore(deps): update taiki-e/install-action action to v2.68.16 by
@renovate[bot] in #76
* chore(deps): update github/codeql-action action to v4.32.5 by
@renovate[bot] in #78
* chore(deps): update taiki-e/install-action action to v2.68.17 by
@renovate[bot] in #79
* chore(deps): update dependency github:rust-secure-code/cargo-auditable
to v0.7.3 by @renovate[bot] in
#80
* chore(deps): update taiki-e/install-action action to v2.68.18 by
@renovate[bot] in #81
* chore(deps): update rust docker tag to v1.93.1 by @renovate[bot] in
#82
* chore(deps): update taiki-e/install-action action to v2.68.19 by
@renovate[bot] in #85
* Update PATH export logic in Dockerfile by @naa0yama in
#84
* chore(deps): update github/codeql-action action to v4.32.6 by
@renovate[bot] in #86
* chore(deps): update taiki-e/install-action action to v2.68.20 by
@renovate[bot] in #87
* chore(deps): update taiki-e/install-action action to v2.68.21 by
@renovate[bot] in #88
* chore(deps): update taiki-e/install-action action to v2.68.22 by
@renovate[bot] in #89
* chore(deps): update taiki-e/install-action action to v2.68.23 by
@renovate[bot] in #90
* chore(deps): update dependency github:rust-secure-code/cargo-auditable
to v0.7.4 by @renovate[bot] in
#83
* chore(deps): update dependency aqua:ast-grep/ast-grep to v0.41.0 by
@renovate[bot] in #57
* chore(deps): update dependency dprint to v0.52.0 by @renovate[bot] in
#67
* chore(deps): update all action update (major) by @renovate[bot] in
#60
* chore(deps): update all action update by @renovate[bot] in
#94
* chore(deps): update taiki-e/install-action action to v2.68.25 by
@renovate[bot] in #95
* chore(deps): update zizmorcore/zizmor-action action to v0.5.2 by
@renovate[bot] in #96
* fix(ci): fix release build and changelog label categorisation by
@naa0yama in #100
* fix(ci): allow tagpr workflow to run on workflow_dispatch by @naa0yama
in #102
* fix(ci): upload assets to tagpr-created release instead of creating a
new one by @naa0yama in #104
### Other Changes
* chore: claude skills update by @naa0yama in
#63
* Change command to postVersionCommand in .tagpr by @naa0yama in
#77
* Update postStartCommand.sh by @naa0yama in
#92
* Update initializeCommand.sh by @naa0yama in
#93
* fix(otel): harden tracing to prevent sensitive data leakage by
@naa0yama in #97
* fix(ci): replace softprops/action-gh-release with gh CLI by @naa0yama
in #98
* Update release.yml by @naa0yama in
#99


**Full Changelog**:
v0.3.0...tagpr-from-v0.3.0

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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