Skip to content

Document the Commons Codec threat model - #449

Open
ppkarwasz wants to merge 2 commits into
apache:masterfrom
ppkarwasz:master
Open

ppkarwasz wants to merge 2 commits into
apache:masterfrom
ppkarwasz:master

Conversation

@ppkarwasz

Copy link
Copy Markdown
Member

This proposes how to implement the Apache Commons umbrella threat model in Commons Codec and applies it to Codec 1.23.0.

Do we want to apply this threat model to earlier Codec versions too?

@garydgregory

Copy link
Copy Markdown
Member

Hi @ppkarwasz
Do you plan on adding a new version of this file for each release? Would it not be simpler to have one file that can evolved as matching the current code in git? The repo is tagged for each release, so you know what matches what.
Am I missing something?

@garydgregory

Copy link
Copy Markdown
Member

@ppkarwasz
Rebase on git master to pick up test fixes needed due to changes in the latest Java 21.

@ppkarwasz

Copy link
Copy Markdown
Member Author

The reason for the versioned file is to allow users to find the threat model of an older version on our website.

If we add a new security property in a future version, we don't want reporters to report CVEs against older versions that didn't make that promise. What do you think, should we have a single file and manage changes via “Since version 1.2.3”?

@garydgregory

Copy link
Copy Markdown
Member

"The reason for the versioned file is to allow users to find the threat model of an older version on our website."
I like that.

- **Family group:** parsers / format readers.
- **Typical untrusted-input surface:**
encoded text passed to decoders
(Base16, Base32, Base58, Base64, Hex, `BinaryCodec`,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ppkarwasz
Sometimes class names are styled, sometimes they're not. This should be consistent. Has anyone actually read this?


- **Kind:** a low-level building block.
`DigestUtils` and `HmacUtils` decorate the JCA (`MessageDigest`, `Mac`),
so the JDK-parity principle applies to them directly.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

applies to them directly

This hints that "the JDK-parity principle" would apply elsewhere "indirectly". What does that even mean?

so the JDK-parity principle applies to them directly.
- **Family group:** parsers / format readers.
- **Typical untrusted-input surface:**
encoded text passed to decoders

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sentences start with a capital letter but there are not even complete sentences :(

@garydgregory garydgregory left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added comments in and out of the "review". This pile of characters is frustrating.


## Profile

- **Kind:** a low-level building block.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does that even mean for an LLM? How many levels are there? Why not just point to the POM description?

- **Kind:** a low-level building block.
`DigestUtils` and `HmacUtils` decorate the JCA (`MessageDigest`, `Mac`),
so the JDK-parity principle applies to them directly.
- **Family group:** parsers / format readers.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference between a "parser" and a "format reader". A "parser" is a well-know term. I've never seen "format reader", it looks like made up term.


### Blake3

`Blake3` is a pure-Java implementation of the BLAKE3 hash, keyed hash and KDF.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is in the Javadoc, we should point to the Javadoc, otherwise ALL of this redundant text will slowly drift away.

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.

3 participants