Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
5e1e713
fix: per-section fix + severity lock + retry limit (#274)
kiyotis Apr 7, 2026
5179fb5
fix: address FB-1 to FB-6 and E2E mock for per-section fix (#274)
kiyotis Apr 8, 2026
dd72c09
fix: add handler assignment note to thread context knowledge file (#274)
kiyotis Apr 9, 2026
9301e0e
docs: fix kc.sh help text --max-rounds default (#274)
kiyotis Apr 9, 2026
1fc24b1
chore: add work notes for per-section fix verification (#274)
kiyotis Apr 9, 2026
c811d80
fix: pass target_ids to final verification for per-section checking (…
kiyotis Apr 10, 2026
1e6bf29
test: update E2E assertions for per-section fix verification (#274)
kiyotis Apr 10, 2026
c9fd549
chore: update v1.4 cache after per-section fix verification (#274)
kiyotis Apr 10, 2026
8a58741
fix: prevent empty string hash from skipping severity lock and normal…
kiyotis Apr 10, 2026
74efdee
docs: add expert review results for PR #274
kiyotis Apr 10, 2026
b6c9cd1
fix: fallback to full-knowledge fix for missing sections (#274)
kiyotis Apr 10, 2026
3be9762
test: add failing test for section-add fix (TDD anchor) (#274)
kiyotis Apr 10, 2026
4647ff4
fix: implement section-add fix for missing section findings (#274)
kiyotis Apr 10, 2026
407b7f4
fix: route range-with-missing-sections findings to section-add (#274)
kiyotis Apr 10, 2026
adb06e9
docs: document reports/ commit policy in knowledge-creator rules
kiyotis Apr 13, 2026
5134baf
fix: fix catalog inconsistency for testing-framework-batch in v1.4
kiyotis Apr 13, 2026
276f634
fix: fix catalog inconsistency for testing-framework-02 in v1.4
kiyotis Apr 13, 2026
51e08a5
fix: remove orphaned v1.4 knowledge files superseded by current catalog
kiyotis Apr 14, 2026
a2449b5
fix: fix v1.2 catalog inconsistency for libraries-07_FormTag
kiyotis Apr 14, 2026
ade4856
chore: add work notes for kc fix verification and副作用調査
kiyotis Apr 14, 2026
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
13 changes: 13 additions & 0 deletions .claude/rules/knowledge-creator.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,19 @@ cd tools/knowledge-creator
# Logs are gitignored and will be regenerated on next execution
```

## Execution Reports

Reports in `tools/knowledge-creator/reports/` are **git-tracked** as a record for later situation analysis.

**Commit policy**: Only commit reports that are consistent with the current cache state.
- A report is consistent when the cache files updated by that run have not been reverted
- If a run's cache is reverted (e.g., due to side effects), delete the corresponding reports before committing

**File set per run** (all 3 must be committed together):
- `{run_id}.md` - Summary report
- `{run_id}-files.md` - Per-file report
- `{run_id}.json` - JSON data

## Execution Logs

Each Phase B/D/E/F execution saves metrics to `executions/` directory:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"id": "libraries-07_FormTag",
"title": "入力データの復元",
"no_knowledge_content": false,
"official_doc_urls": [],
"index": [
{
"id": "s1",
"title": "hiddenの暗号化処理",
"hints": [
"Encryptor",
"hiddenEncryptor",
"AES 128bit",
"n:plainHidden",
"WebView_PlainHiddenTag",
"hidden暗号化",
"改竄検知",
"BASE64エンコード",
"hiddenパラメータ暗号化",
"セッション毎に鍵生成",
"変更パラメータ",
"WebView_ChangeableParams"
]
},
{
"id": "s2",
"title": "hiddenの復号処理",
"hints": [
"NablarchTagHandler",
"nablarch_hidden",
"WebView_NablarchTagHandler",
"改竄検知",
"hiddenパラメータ復号",
"ハッシュ値検証"
]
},
{
"id": "s3",
"title": "入力データの復元",
"hints": [
"入力データ復元",
"スコープ検索順序",
"ページスコープ",
"リクエストスコープ",
"セッションスコープ"
]
},
{
"id": "s4",
"title": "入力項目の確認画面用の出力",
"hints": [
"n:confirmationPage",
"confirmationPage",
"確認画面出力",
"WebView_ConfirmationPageTag",
"n:text",
"WebView_TextTag",
"textタグ確認画面"
]
},
{
"id": "s5",
"title": "passwordタグの出力例",
"hints": [
"n:password",
"WebView_PasswordTag",
"確認画面",
"パスワードマスク",
"置換文字"
]
},
{
"id": "s6",
"title": "selectタグの出力例",
"hints": [
"n:select",
"WebView_SelectTag",
"確認画面",
"選択項目出力",
"brタグ区切り",
"elementLabelPattern",
"elementLabelProperty",
"elementValueProperty"
]
}
],
"sections": {
"s1": "暗号化は `Encryptor` インタフェースを実装したクラスが行う。デフォルトはAES(128bit)。アルゴリズムを変更する場合は、Encryptorを実装したクラスをリポジトリに `\"hiddenEncryptor\"` という名前で登録する。\n\n暗号化はformタグ毎に行い、以下のデータをまとめて暗号化し1つのhiddenタグで出力する(パラメータ名も含めて暗号化するため改竄自体を難しくしている):\n\n- カスタムタグのhiddenタグで明示的に指定したhiddenパラメータ\n- ウィンドウスコープの値\n- submit/submitLink/buttonで指定したリクエストID\n- 変更パラメータ (:ref:`WebView_ChangeableParams`)\n\n改竄検知のためハッシュ値を含める。リクエストIDは異なる画面間の値置き換えによる改竄検知に、ハッシュ値は値の書き換えによる改竄検知に使用する。暗号化した結果はBASE64でエンコードしてhiddenタグに出力する。\n\nなお、変更パラメータ (:ref:`WebView_ChangeableParams`) は、暗号化する場合と暗号化しない場合で、nablarch_hiddenタグの値が暗号化されることを除き、リクエスト時の動作が同じとなる。\n\n> **注意**: カスタムタグのhiddenタグで指定したhiddenパラメータはクライアント側のJavaScriptで操作できない。JavaScriptでhiddenパラメータを操作する場合は :ref:`WebView_PlainHiddenTag` を使用する。`n:plainHidden` に指定された値はhidden暗号化対象とならず、常に `<input type=\"hidden\">` として出力される。\n\n```html\n<%-- JSPの実装例 --%>\n<n:plainHidden name=\"user.id\" />\n\n<%-- HTMLの出力例 --%>\n<input type=\"hidden\" name=\"user.id\" value=\"U0000000001\" />\n```\n\n> **注意**: 入力データを暗号化して出力したhiddenタグのデータ量は平文の約1.2倍に増量する(1Mバイトで比較)。\n\n**暗号化キー**: セッション毎に生成するため、同じユーザでもログインし直すとログイン前の画面から処理を継続できない。\n\n> **注意**: フレームワークが出力したHTML以外からのリクエストは暗号化できない(ログイン画面、ショッピングサイトの商品ページ等が該当)。暗号化できないリクエストが多数を占めるアプリケーションでは、別途パラメータの改竄と情報漏洩への対策が必要。",
"s2": "**クラス**: `NablarchTagHandler`(設定方法は :ref:`WebView_NablarchTagHandler` 参照)\n\n設定では、改竄を検知した場合に遷移させる画面のリソースパスとレスポンスステータスを指定する。\n\n以下のいずれかの場合に改竄と判定し、指定された画面に遷移させる:\n\n1. 暗号化したhiddenパラメータ(nablarch_hidden)が存在しない\n2. BASE64のデコードに失敗\n3. 復号に失敗\n4. 暗号化時に生成したハッシュ値と復号した値のハッシュ値が一致しない\n5. 暗号化時のリクエストIDと受け付けたリクエストのリクエストIDが一致しない",
"s3": "入力画面では、入力エラーの場合と確認画面から戻る場合に、入力データを復元した状態で再表示することが要求される。カスタムタグによりリクエストパラメータから入力データを復元するため、アプリケーションプログラマは入力データの取得先を意識した実装を行う必要がない。\n\nカスタムタグはname属性に対応する値を以下の順に検索して出力する(writeタグはリクエストパラメータを検索対象に含めない):\n\n1. Servlet APIのページスコープ\n2. Servlet APIのリクエストスコープ\n3. Servlet APIのリクエストパラメータ\n4. Servlet APIのセッションスコープ",
"s4": "入力項目のカスタムタグは、入力画面と全く同じ記述のまま、確認画面用の出力を行うことができる。確認画面のJSPに :ref:`WebView_ConfirmationPageTag` を追加する:\n\n```java\n<n:confirmationPage />\n```\n\n:ref:`WebView_TextTag` は確認画面でそのまま出力する。\n\n```jsp\n<n:text name=\"systemAccount.loginId\" size=\"22\" maxlength=\"20\" />\n```\n\n```html\n<%-- 入力画面 --%>\n<input type=\"text\" name=\"systemAccount.loginId\" value=\"nablarch2\" size=\"22\" maxlength=\"20\" />\n\n<%-- 確認画面 --%>\nnablarch2\n```",
"s5": ":ref:`WebView_PasswordTag` は確認画面では文字を置き換えて出力する。置換文字はpasswordタグの属性で変更できる(デフォルトは `*`)。\n\n```jsp\n<n:password name=\"systemAccount.newPassword\" size=\"22\" maxlength=\"20\" />\n```\n\n```html\n<%-- 入力画面 --%>\n<input type=\"password\" name=\"systemAccount.newPassword\" value=\"password\" size=\"22\" maxlength=\"20\" />\n\n<%-- 確認画面('*'に置換して出力、置換文字は変更可能) --%>\n********\n```",
"s6": ":ref:`WebView_SelectTag` は確認画面では指定されたフォーマットで出力する。デフォルトはbrタグ区切り(div/ul/ol/スペース区切りに変更可能)。確認画面では選択されたオプションのみが出力される。\n\n```jsp\n<n:select name=\"systemAccount.useCase\" multiple=\"true\" size=\"5\"\n listName=\"allUseCase\" elementLabelProperty=\"useCaseName\" elementValueProperty=\"useCaseId\"\n elementLabelPattern=\"${VALUE}:${LABEL}\" />\n```\n\n```html\n<%-- 入力画面 --%>\n<select name=\"systemAccount.useCase\" size=\"5\" multiple=\"multiple\">\n <option value=\"UC00000000\" selected=\"selected\">UC00000000:ログイン</option>\n <option value=\"UC00000001\">UC00000001:ユーザ一覧照会</option>\n <option value=\"UC00000002\" selected=\"selected\">UC00000002:ユーザ情報登録</option>\n</select>\n\n<%-- 確認画面 --%>\nUC00000000:ログイン<br />UC00000002:ユーザ情報登録<br />\n```"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
スレッドコンテキストはスレッドローカル変数上の変数スコープ。ユーザIDやリクエストIDなど、実行コンテキスト経由での引き回しが難しいパラメータを格納する。

- 多くの値は[../handler/ThreadContextHandler](../handlers/handlers-ThreadContextHandler.md)によって設定される
- それ以外ハンドラでも、スレッドコンテキストに変数を設定するものが存在するほか、業務アクションハンドラから任意の変数を設定することも可能である。
- 子スレッドを起動した場合、親スレッドの値が暗黙的に引き継がれる
- 子スレッドで値を変更する場合は、明示的に子スレッドで値を設定すること

Expand Down
Loading