算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
threat-modeling【设计与创意】Works out what could go wrong in a system's design before it is built — who would attack it, how, and which defences are worth having. Use this whenever the user is designing a system that handles sensitive data, money, or authentication, asks what the security risks are, mentions threat modeling or STRIDE, or is starting a feature with a meaningful …
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Threat modeling asks what could go wrong here while the answer is still cheap to act on. Code review finds the bug you wrote; threat modeling finds the defence you never designed.
Four questions structure the whole exercise:
The output is a short list of decisions, not a risk register nobody reads.
You cannot reason about attacks without knowing where untrusted things meet trusted things.
Sketch: the components, the data flows between them, the datastores, and — most importantly — the trust boundaries those flows cross. A boundary is anywhere the level of trust changes: internet to your edge, your service to a third party, one tenant's data to another's, user to admin.
Keep it to one diagram someone can hold in their head. See diagramming.
Done when: every trust boundary in the design is marked.
Generic "hackers" produces generic mitigations. Be specific about who and why:
For each, what would they want here? Data, money, disruption, access to something else? An attacker with no motive for your system is not worth designing against.
Done when: each attacker has a stated capability and objective.
Systematic beats creative. Use STRIDE against each component and flow:
| Threat | Ask | |
|---|---|---|
| S | Spoofing | Can someone pretend to be another user or service? |
| T | Tampering | Can data be modified in transit or at rest? |
| R | Repudiation | Could someone deny an action, and could you prove otherwise? |
| I | Information disclosure | Can data leak to someone who should not see it? |
| D | Denial of service | Can someone make it unavailable, cheaply? |
| E | Elevation of privilege | Can someone gain rights they should not have? |
The prompt list matters because it surfaces the categories you do not naturally think about — repudiation and DoS are consistently the ones teams skip.
Done when: every element has been walked against all six.
You cannot mitigate everything. Rank by:
Then decide, explicitly, for each: mitigate, accept, transfer, or eliminate. Accepting a risk is a legitimate decision when written down with a reason. Silently not addressing it is not the same thing, and the difference matters at the review afterwards.
Done when: each threat has a named decision, including the accepted ones.
Rank the fixes by how hard they are to get wrong later:
A control that depends on every future developer remembering it will eventually fail. Push protections down to where the platform enforces them.
Done when: the important threats have structural, not procedural, mitigations.
A page or two: the diagram, the boundaries, the ranked threats, the decisions.
Revisit when the design changes materially — a new integration, a new data type, a new user role. A threat model from before the third-party integration does not cover it.
Done when: the document is short enough that it will be read again.
Give the diagram, the top threats with their decisions, and — separately — the accepted risks with their reasoning. That accepted list is the most valuable output: it is the record of what you knowingly chose, which is what distinguishes a considered design from an oversight.