-
Notifications
You must be signed in to change notification settings - Fork 1
pkc%feat: add fixed-length buffers for secret-holding types, enforce subtle and zeroize use with CodeQL, implement ungated byte bags for BLS and ECDSA types, add enum_map helper macro
#22
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 all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
4a0c05f
sdk%chore: update rulers in vscode to match CodeQL, Rust linting
kwvg 00cd249
sdk%lint: enable stricter rules for `script`, fix violations
kwvg fc31bd0
sdk%lint: enable stricter rules for `pkc`, fix violations
kwvg 193e7a2
sdk%fix: add redacted `Debug` impls for `Fr` and `VecEncoder`
kwvg 9cca2af
types%feat(codec): enrich `DecodeError` with variant, error propagation
kwvg ac24140
types%feat: add enum helper macro, propagate to `primitives`, `script`
kwvg 877f105
pkc%refac: restructure `k256` module into `ecdsa` with operational types
kwvg 610c541
pkc%refac(ecdsa): expose `EcdsaError` without the feature gate
kwvg daef291
pkc%refac(tests): inline ecdsa discrete tests into source modules
kwvg 9d19611
types%refac(codec): fold the byte-newtype trait set into `derive_bytes!`
kwvg 76b5572
types%feat(codec): add fixed-width `Arr{En,De}coder` for sensitive bufs
kwvg 0a19896
sdk%lint(codeql): resolve trait impls through the type layer
kwvg 4e2c3ca
sdk%lint(codeql): add width, derive, zero and compare rules for secrets
kwvg 600372c
pkc%feat(ecdsa): implement `EcdsaSkBytes` as `zeroize`d secret byte bag
kwvg ab31069
pkc%feat(bls): define `BlsSchemeId` scheme discriminator trait
kwvg 4fe9fe3
pkc%feat(bls): define supported signature schemes w/ `BlsSigId`
kwvg b5892ef
pkc%feat(bls): implement `BlsPkBytes` as public key byte bag
kwvg 8dc0273
pkc%feat(bls): implement `BlsSkBytes` as `zeroize`d secret byte bag
kwvg 7ea891c
pkc%feat(bls): implement `BlsSigBytes` as signature byte bag
kwvg 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,38 @@ | ||
| /** | ||
| * Copyright (c) 2026-present, The Dash Core developers | ||
| * SPDX-License-Identifier: MIT | ||
| * See the accompanying file LICENSE or https://opensource.org/license/MIT | ||
| * | ||
| * @description Helpers for reading and resolving written type positions. | ||
| */ | ||
|
|
||
| import rust | ||
| private import codeql.rust.internal.typeinference.Type as T | ||
| private import codeql.rust.internal.typeinference.TypeMention | ||
|
|
||
| /** Gets the head identifier of `tr`, e.g. `Vec` for `Vec<u8>`. */ | ||
| string typeHead(TypeRepr tr) { | ||
| result = tr.(PathTypeRepr).getPath().getSegment().getIdentifier().getText() | ||
| } | ||
|
|
||
| /** Gets the type item `tr` names, resolved through the type layer. */ | ||
| TypeItem namedTypeItem(TypeRepr tr) { | ||
| result = tr.(TypeMention).getType().(T::DataType).getTypeItem() | ||
| } | ||
|
|
||
| /** Gets the declared type of a field of `t`, including enum variant fields. */ | ||
| TypeRepr fieldTypeRepr(TypeItem t) { | ||
| result = t.(Struct).getFieldList().(StructFieldList).getAField().getTypeRepr() | ||
| or | ||
| result = t.(Struct).getFieldList().(TupleFieldList).getField(_).getTypeRepr() | ||
| or | ||
| result = t.(Union).getStructFieldList().getAField().getTypeRepr() | ||
| or | ||
| exists(Variant v | | ||
| v = t.(Enum).getVariantList().getAVariant() and | ||
| ( | ||
| result = v.getFieldList().(StructFieldList).getAField().getTypeRepr() or | ||
| result = v.getFieldList().(TupleFieldList).getField(_).getTypeRepr() | ||
| ) | ||
| ) | ||
| } |
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.