-
Notifications
You must be signed in to change notification settings - Fork 1k
Store attestations for PEP740 #16302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 36 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
ab7b15a
Store and retrieve attestations
DarkaMaul 1cf746d
Merge branch 'main' into dm/store-attestations
DarkaMaul cf1359f
Continue to work.
DarkaMaul ae262d4
Update attestation storage and retrieval
DarkaMaul e580a73
Update comments
DarkaMaul fdcd782
Fix import
DarkaMaul 226fd0d
Please linter
DarkaMaul 00ca535
Use the correct event to attach a publisher_url to a `File`
DarkaMaul 600b398
Rename ReleaseFileAttestation to Attestation
DarkaMaul 2bdedb5
Merge branch 'main' into dm/store-attestations
DarkaMaul 4fd0143
Merge branch 'main' into dm/store-attestations
DarkaMaul 9dd8a91
Update names
DarkaMaul bd042f2
Update table migration
DarkaMaul 1d05571
Update metrics
DarkaMaul a55a00f
Update attestations storage
DarkaMaul 1e65c5f
Merge branch 'main' into dm/store-attestations
DarkaMaul d9bd6a8
Update pypi-attestations and sigstore dependencies
DarkaMaul efefd50
Fix wrong merge.
DarkaMaul 7f29774
Generate Provenance file on upload.
DarkaMaul 2f31749
Generate and store provenance file during upload.
DarkaMaul fed1c40
Merge branch 'main' into dm/store-attestations
DarkaMaul 0c96751
Improve tests
DarkaMaul ff338da
Fix test error
DarkaMaul 284c488
Fix test error
DarkaMaul 31f633b
Merge branch 'main' into dm/store-attestations
DarkaMaul 16eb83a
Merge branch 'main' into dm/store-attestations
DarkaMaul a36bb1a
Merge branch 'main' into dm/store-attestations
DarkaMaul ba6752d
Fix merge error
DarkaMaul a26047d
Simplify legacy answer
DarkaMaul 8b99fb7
Introduce AttestationsService
DarkaMaul 342b8bf
Rename AttestationsService to ReleaseVerification service and integra…
DarkaMaul 6e4c91e
Remove useless check
DarkaMaul 80988d0
Integrate generate_and_store_provenance within persist_attestations
DarkaMaul 7a10776
Merge branch 'main' into dm/store-attestations
DarkaMaul 9914be2
Merge branch 'refs/heads/main' into dm/store-attestations
DarkaMaul eec0b46
Remove file.publisher_url which is no longer used.
DarkaMaul 98d39c4
Rename ReleaseAttestationService to IntegrityService
DarkaMaul 0a013a8
Merge branch 'main' into dm/store-attestations
di 08a4d9d
Merge branch 'main' into dm/store-attestations
di 8d00c87
Linting
di 2ca1918
requirements: bump sigstore, pypi-attestations
woodruffw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
import hashlib | ||
|
||
import factory | ||
|
||
from warehouse.attestations.models import Attestation | ||
|
||
from .base import WarehouseFactory | ||
|
||
|
||
class AttestationFactory(WarehouseFactory): | ||
class Meta: | ||
model = Attestation | ||
|
||
file = factory.SubFactory("tests.common.db.packaging.FileFactory") | ||
attestation_file_blake2_digest = factory.LazyAttribute( | ||
lambda o: hashlib.blake2b(o.file.filename.encode("utf8")).hexdigest() | ||
) |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.