Repository navigation
chore(security): add the OSS Scanner build, threat model and security policy - #15
Merged
Merged
Conversation
8 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prepares the enrolment of this library in the OSS Scanner, as web-auth/webauthn-framework#978 and web-auth/cose-lib#229 did. The scanner builds an enrolled project in an isolated VM, scans it without network access and sends its findings privately to the security contact. It drops the findings located in dependencies, so the AES Key Wrap that cose-lib and the JOSE libraries rely on is only covered if this repository is enrolled on its own. The enrolment itself is a
project.yamlin the scanner repository; it points to the two files added under.oss-scanner/, so that they can change without a pull request over there.The image builds, and the test suite passes in it with the network disabled: 18 tests, 36 assertions.
What's included
.oss-scanner/Dockerfilestarts fromghcr.io/spomky-labs/phpqa:8.4, the image the CI jobs of the sibling projects run in (the workflows of this repository predate it), installs the Composer dependencies and runs the test suite once with the PHPUnit 9 ofcomposer.json.phpunit.xml.distand the@testannotations are written for that version; thephpunit-11of the image runs the same 18 tests but reports 19 deprecations on them.composer.jsonpredatesallow-plugins, so the PHPStan and Infection installer plugins are allowed in the global Composer configuration of the image, which leavescomposer.jsonuntouched.COMPOSER_ROOT_VERSIONis not set: without the Git metadata Composer only notes that it defaults the root version to 1.0.0, and the install and the tests are unaffected. The dev tools themselves are not updated here..oss-scanner/threat_model.mdtells the scanner where untrusted input enters (the wrapped key given tounwrap()), what is trusted (the KEK, the key to wrap, the mode), which properties must hold, which components matter most, how to write a reproducer, how severities are rated and what is out of scope. No advisory exists for this library, so the severity scale follows the threat models of the projects that depend on it, cose-lib first.SECURITY.mdis new: it lists the supported versions (7.x) and both private reporting channels, GitHub private vulnerability reporting, which is now enabled on this repository, and e-mail to security@spomky-labs.com..gitattributesexport-ignores/.oss-scanner, so that the scanner files stay out of the Composer archives.Without a pinned branch the scanner follows the default branch,
master.