Audit Session Cookie Attributes
Added 2026-10
Audit Session Cookie Attributes — Chinese original prompt
请检查 [项目名称] 里所有会话相关 Cookie 的属性设置,逐项确认安全传输、禁止脚本读取、跨站携带策略、作用域与有效期是否合理,并说明每项缺失会导致什么后果。输出:Cookie 清单与当前属性、逐项风险说明、修改后的设置、以及改动可能影响的嵌入与跨域场景。
Site original
Chinese original
Example
Sample input
检查后台管理系统里所有会话 Cookie 的属性,之前跨域嵌入时出过问题,帮我逐项确认。
The output should include
- 逐项确认传输脚本跨站与作用域
- 说明缺失每项会导致什么后果
- 改动对嵌入与跨域场景的影响
Replace these placeholders 1
Swap the bracketed parts for your own details before sending.
[项目名称]
How to use
收紧跨站策略前先确认支付回跳、iframe 嵌入这些流程还能走通。
Try tweaking it
- Have it restate requirements and constraints before writing code.
- Ask for the smallest change plus a rollback path, not a full-file rewrite.
What you should get
- A minimal, runnable change with copy-ready code
- Impact list: which files and call sites must follow
Common mistakes
- Asking it to touch ten files at once, then losing track of what broke what.
- Pasting only the error, with no code or version, and getting an unfixable answer.
How to check the output
- The change runs, can be rolled back, and touches nothing unrelated.
- Edge cases (empty, oversized, concurrent) are covered or explained.
Where it works
- Good for: having it restate requirements and constraints, then propose the smallest runnable change.
- Watch out: include versions and a minimal reproduction with the error, or the fix may look plausible but not fit.