Skip to content

fix(deps): update rustls-webpki and webpki-roots for security advisories - #167

Merged
furedea merged 1 commit into
mainfrom
fix/update-webpki
Oct 21, 2026
Merged

furedea merged 1 commit into
mainfrom
fix/update-webpki

Conversation

@furedea-agent

@furedea-agent furedea-agent Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

概要

main の CI(rust-audit / cargo-deny)が次の 2 件の advisory で失敗しているため,ureq 経由で入っている 2 つの crate を修正版に更新します.変更は Cargo.lock だけです.

advisory crate 更新前 更新後
RUSTSEC-2026-0382 rustls-webpki 0.103.15 0.103.16
RUSTSEC-2026-0381 webpki-roots 1.0.9 1.0.10

確認項目

  • cargo update -p rustls-webpki -p webpki-roots 以外の依存は変わっていない
  • cargo deny check: advisories ok, bans ok, licenses ok, sources ok
  • cargo test: 全件 pass

詳細

flake は cargoLock.lockFile = ./Cargo.lock を参照しており,固定ハッシュは持っていないため,flake 側の更新は不要です.

#166(numeric lint の適用)は,このPRのマージ後に rebase します.

🤖 Generated with Claude Code

Bump rustls-webpki to 0.103.16 (RUSTSEC-2026-0382) and webpki-roots to
1.0.10 (RUSTSEC-2026-0381), both pulled in through ureq, so cargo-deny
passes again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@furedea
furedea merged commit 70c9a22 into main Oct 21, 2026
11 checks passed
@furedea
furedea deleted the fix/update-webpki branch October 21, 2026 04:43
furedea added a commit that referenced this pull request Oct 21, 2026
## 概要

template-rust と同じ数値系 lint と,lefthook の `file-length`(500
行)を導入しました.既存の違反は,挙動を変えないリファクタですべて解消しています.`#[allow]` / `#[expect]`
は追加していません.

導入した clippy の設定は次のとおりです.

- all / pedantic
- `too-many-arguments-threshold` 3
- `excessive-nesting-threshold` 2
- `cognitive-complexity-threshold` 15
- `allow_attributes_without_reason`

あわせて,Rust のモジュールディレクトリ(snake_case)が ls-lint の `.dir`
ルールに違反していた既存の問題も直しました.

Refs furedea/dotfiles#247

## 違反数

| 種別 | 導入前 | 導入後 |
| --- | ---: | ---: |
| `clippy::excessive_nesting` | 149 | 0 |
| `clippy::too_many_arguments` | 24 | 0 |
| `clippy::cognitive_complexity` | 2 | 0 |
| その他の pedantic(`needless_pass_by_value` 6,`format_push_string` 3 など) |
20 | 0 |
| **clippy 合計**(`cargo clippy --all-targets`) | **195** | **0** |
| 500 行超のファイル | 6 | 0 |
| ls-lint(引数なし)の `.dir` 違反(`src/github_app`) | 1 | 0 |

500 行を超えていたのは次の 6 ファイルです.

- `skills.rs`(804 行)
- `github_app.rs`(668 行)
- `hooks.rs`(613 行)
- `cli.rs`(525 行)
- `tests/neutral_generated_artifacts.rs`(868 行)
- `tests/external_hook_bundles.rs`(653 行)

## 受け入れ条件

- [x] template と同じ数値ルールが `Cargo.toml` / `clippy.toml` と
lefthook(`file-length`)に入っている
- [x] 違反ゼロ,理由のない抑止属性なし(抑止属性の提案もなし)
- [x] 挙動を変えない分割のみで,既存テストが通る
- [x] Codex の adversarial review の指摘(medium 1 件)を修正した
- [x] CI の rust-audit が通る(#167 のマージ後に origin/main へ rebase し,c64eb26 で
CI の全チェックが pass)

## 詳細

### 設定

- `Cargo.toml`: `[lints.clippy]` に,template と同じ次のルールを追加しました.既存の
`dbg_macro` などの deny は残しています.
  - `all` / `pedantic`
  - `allow_attributes_without_reason`
  - `cognitive_complexity`
  - `excessive_nesting`
- `clippy.toml`: template のファイルをそのまま追加しました.
- `lefthook.yml`: template の `file-length` コマンドを追加しました.
- `.ls-lint.yml`: template-rust と同じ構造に揃えました.
  - ルート直下のファイル規則を YAML anchor(`<<: &files`)にまとめました.
- `src:` ブロックでは `<<: *files` でその規則を取り込み,`.dir:
regex:[a-z0-9]+(_[a-z0-9]+)*` を指定しました.
- ls-lint v2 では,ネストしたブロックがルートの規則を引き継がずに置き換えます.そのため `.dir` だけを書くと,`src`
配下のファイル名規則が黙って外れます.
  - `tests/` を含む `src` 以外のディレクトリは,kebab-case のままです.

### ls-lint の確認(一時ファイル・ディレクトリは確認後に削除済み)

| ケース | 結果 |
| --- | --- |
| 引数なしの `ls_lint` | pass |
| 一時的な `src/bad-dir` | fail(`.dir`) |
| 一時的な `src/good_dir` | pass |
| 一時的な `src/BadFile.rs` | fail(`.*`.`src` 配下でもファイル規則が効いている) |
| 一時的な `tests/bad_dir` | fail(kebab-case のまま) |

### リファクタ方針

- **ネストの解消:** 閾値 2 では,`impl` と `mod tests` もネストに数えられます.そのため,メソッド本体の `if`
/ `for` / 複数行クロージャはそれだけで違反になります.
  - 分岐は module 直下の関数へ移しました.
  - `if … bail!` は `ensure!` に置き換えました.
- **引数過多の解消:** 一緒に渡される値を,小さな構造体にまとめました.
  - `GenerationContext { source, external_hooks, runtime_root }`
  - `SkillTarget { provider, path }`
  - `MintedToken { token, issuer }`
  - `CommandRelocation`,`CommandNormalization`,`HookLocation`
- **500 行超のファイル:** 次のどちらかで解消しました.
  - inline のテストモジュールを sibling ファイル(`src/<module>/tests.rs`)に移す
  - まとまった submodule を切り出す(`skills/frontmatter.rs`)
- **結合テストの分割:** ルートファイルを残したまま,`#[path =
"neutral-generated-artifacts/x.rs"] mod x;` の形で分割しました.テスト crate
名とテスト件数は変わっていません.

### Codex レビューの指摘への対応

- **問題:** `ExternalHookBundle::merge_hooks` は,bundle の provider
ファイルがあるかを確認する前に `hooks["hooks"]` を可変参照で取っていました.
- `"devin": {}` の source に Claude 専用の `--extra-hook` を渡すと,`hooks: null`
が挿入されていました.
  - その結果,`sync-devin-config` が既存の Devin hooks を null で上書きしていました.
- **修正:** `HookFile::target` を追加し,bundle のファイルを読めたときだけ参照を取るようにしました.
- **回帰テスト:** `bundle_without_devin_hooks_keeps_existing_devin_hooks`
を追加しました.修正前のコードで失敗することを確認済みです.

### 挙動固定のために追加したテスト

- hooks のコマンド再配置
- hook メタデータの並び順
- オブジェクトでない任意セクションの拒否
- frontmatter の継続行の扱いと,キーより前の行の拒否
- hooks inventory の出力(2 件)
- 上記の Devin hooks の回帰テスト

### 確認結果(rebase 後の c64eb26)

| 確認項目 | 結果 |
| --- | --- |
| `cargo clippy --all-targets -- -D warnings` | OK |
| `cargo test` | 全件 pass(lib 121 件,external_hook_bundles 14 件) |
| `cargo deny check` | advisories ok, bans ok, licenses ok, sources ok |
| `lefthook run pre-commit --all-files` | OK |
| `ls_lint`(引数なし) | OK |
| CI | 全チェック
pass(all-green,rust-audit,test,lint,format,nix-lint,execpolicy,CodeQL,dependency-review)
|

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: furedea <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
furedea added a commit that referenced this pull request Oct 21, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.9.6](agent-harness-v0.9.5...agent-harness-v0.9.6)
(2026-10-21)


### Bug Fixes

* **deps:** update rustls-webpki and webpki-roots for security
advisories ([#167](#167))
([70c9a22](70c9a22))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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