SEC2-013: The threat model's list of what stays a person's own on a shared record omits the contacts they add #955
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#955
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on 2026-10-16 in a read-only security review of
postuloat56fc9d531, checked by a second, independent pass.Severity: Informational · Category: Authentication/Authorization · Reference: CWE-1059 (Insufficient Technical Documentation); OWASP A04:2021 (Insecure Design)
Location:
docs/THREAT-MODEL.md:14(the sentence "A person's notes, their decision about a listing, its history and their applications are theirs whatever is shared")src/postulo/api/routers/companies.py:271-276(add_contacton a read grant)tests/security/test_sharing_sweep.py:76-85(API_READholdspostulo-api:add_contact)Issue
The threat model promises that "a read-only grant reaches no address that changes a record" and names what a person keeps of their own on a shared record: notes, decision, history, applications. The code and the sharing sweep also let a read-only grantee add a contact at a shared company (
add_contactlooks the company up with read access and creates aContactowned by the caller), and that contact is theirs: the company's owner does not see it (_detailprefetchesContact.objects.visible_to(owner)), andtest_shared_leaks.pyprotects the owner's own private contact the same way. The behaviour is consistent; the sentence that explains it is not complete, so a reader of the threat model reads "adds a contact to somebody else's company on a read-only grant" as a breach when it is the design.Impact
None in code. A documentation gap that invites a false finding, or a future change that "fixes" the design in one place and not the other.
Fix
Extend the sentence at
docs/THREAT-MODEL.md:14to "A person's notes, their decision about a listing, its history, their applications and the contacts they add at a company are theirs whatever is shared", and say the same in the sharing paragraph of the wiki's Sharing page if it lists them. Done when the sentence names contacts andtests/security/test_sharing_sweep.py's module docstring (:8-10) lists them beside the decision, the history and the application.Related
#896 (closed) - the sharing design this sentence describes.