Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6157f56
Fix BAPs
ghostxmerlin May 23, 2025
01efa50
first version to add more protection for check descriptor
ghostxmerlin May 26, 2025
c310b94
close some log, change place of the quorum check and test case for de…
ghostxmerlin May 27, 2025
cb805a7
upload track docs and search keywords.
ghostxmerlin May 27, 2025
a11e4f5
change get action step
ghostxmerlin May 28, 2025
cc96c41
fix ci
ghostxmerlin May 28, 2025
8b987a6
fix code style
ghostxmerlin May 28, 2025
dba15ce
minor fix
ghostxmerlin May 28, 2025
c98def2
fix constants. strncpy
ghostxmerlin May 30, 2025
b7b194a
action type max len
ghostxmerlin May 30, 2025
b76b42d
fix BBN_DESCRIPTOR_BIP322
ghostxmerlin May 30, 2025
92ef852
fix bad strlen
ghostxmerlin May 31, 2025
1b3b9a4
use force the null byte at the end way
ghostxmerlin May 31, 2025
9500884
fix risk in validate_xx
ghostxmerlin May 31, 2025
2f1c87a
force the null terminator for all strncpy
ghostxmerlin Jun 1, 2025
a446c38
fix slashing to validate burn address
ghostxmerlin Jun 4, 2025
e82bd43
add fee validation. Unbonding ==, slashing >=
ghostxmerlin Jun 5, 2025
0ac0a1e
add OP_RETRUN for mainnet burn address check
ghostxmerlin Jun 6, 2025
c4e8ecd
add test case for burn address and fee
ghostxmerlin Jun 6, 2025
072ab93
add unit-test files
ghostxmerlin Jun 10, 2025
306d96a
remove dead
ghostxmerlin Jun 11, 2025
e8f6847
add and change yml for unit test
ghostxmerlin Jun 11, 2025
69810d2
add on unit-test
ghostxmerlin Jun 11, 2025
9b5c75b
remove wallet
ghostxmerlin Jun 11, 2025
e924699
remove dispaly
ghostxmerlin Jun 11, 2025
1bddba7
fix cmake
ghostxmerlin Jun 11, 2025
84170c1
change ci trigger branch
ghostxmerlin Jun 11, 2025
e343692
fix function test and code style
ghostxmerlin Jun 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/build_and_functional_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ on:
workflow_dispatch:
push:
branches:
- master
- main
- develop
- babylon
pull_request:

jobs:
build_application:
name: Build application using the reusable workflow
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ on:
workflow_dispatch:
push:
branches:
- master
- develop
- babylon
pull_request:
branches:
- master
- develop


jobs:
job_build:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/codeql-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ on:
workflow_dispatch:
push:
branches:
- master
- develop
- babylon
pull_request:
branches:
- master
- develop


jobs:
analyse:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/guidelines-enforcer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ on:
workflow_dispatch:
push:
branches:
- master
- develop
- babylon
pull_request:

jobs:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/lint-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
workflow_dispatch:
push:
branches:
- master
- main
- develop
- babylon
pull_request:

jobs:
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Unit

on:
workflow_dispatch:
push:
branches:
- babylon
- unit-test
pull_request:

jobs:
job_unit_test:
name: Unit test
runs-on: ubuntu-latest

container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest

steps:
- name: Clone
uses: actions/checkout@v4

- name: Build and Run unit tests
run: |
cd unit-tests/
cmake -Bbuild -H. && make -C build && make -C build test
15 changes: 15 additions & 0 deletions doc/coinspect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Bug Tracking Table

| NO | LEVEL | NAME | comment | solution |
|-----|--------|-----------------------------------------------|-------------------------------------------|---------------------------------------------|
| 1 | LOW | Buffer overrun | Ledger's musigsession_commit code | Done. Delete all musig code |
| 2 | HIGH | Removed validation checks | fix April 3th 105a8c0 | Done. |
| 3 | HIGH | Insecure policy name matching | | Done. Add new function to check descriptor |
| 4 | Medium | Infinite point check missing | Ledger's musig code | Done. Delete all musig code |
| 5 | LOW | Outdated documentation | | Done. As recommendation |
| 6 | LOW | Hardcoded constants | Ledger's musig Hardcoded | Done. Delete all musig code |
| 7 | LOW | Insecure string copying | Ledger's UI code | Suggest to ignore |
| 8 | HIGH | Lack of fee and output validations | There are ways to do validations | Please search ‘BAP-008’ in code |
| 9 | LOW | flawed fingerprint policy | fingerprint has special using | Please search ‘BAP-009’ in code |
| 10 | LOW | Insufficient input validation | There are ways to do validations | Please search ‘BAP-010’ in code |
| 11 | HIGH | Insufficient SIGHASH TYPE enforcement | | Done. As recommendation |
20 changes: 10 additions & 10 deletions src/boilerplate/dispatcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,16 @@ static int process_interruption(dispatcher_context_t *dc) {
return -1;
}

PRINTF("=> CLA=%02X | INS=%02X | P1=%02X | P2=%02X | Lc=%02X | CData=",
cmd.cla,
cmd.ins,
cmd.p1,
cmd.p2,
cmd.lc);
for (int i = 0; i < cmd.lc; i++) {
PRINTF("%02X", cmd.data[i]);
}
PRINTF("\n");
// PRINTF("=> CLA=%02X | INS=%02X | P1=%02X | P2=%02X | Lc=%02X | CData=",
// cmd.cla,
// cmd.ins,
// cmd.p1,
// cmd.p2,
// cmd.lc);
// for (int i = 0; i < cmd.lc; i++) {
// PRINTF("%02X", cmd.data[i]);
// }
// PRINTF("\n");

// INS_CONTINUE is the only valid apdu here
if (cmd.cla != CLA_FRAMEWORK || cmd.ins != INS_CONTINUE) {
Expand Down
1 change: 1 addition & 0 deletions src/common/script.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ int format_opscript_script(const uint8_t script[],
}

strncpy(out, "OP_RETURN ", MAX_OPRETURN_OUTPUT_DESC_SIZE);
out[MAX_OPRETURN_OUTPUT_DESC_SIZE - 1] = '\0';
int out_ctr = 10;

// If the length of the script is 1 (just "OP_RETURN"), then it's not standard per bitcoin-core.
Expand Down
3 changes: 2 additions & 1 deletion src/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
#define BBN_LEAF_HASH_STR_LEN 65U
#define BBN_FINALITY_PK_STR_LEN 65U

#define BBN_COV_PUBKEY_MAX_COUNT 16U
#define BBN_COV_PUBKEY_MAX_COUNT 16U
#define BBN_COV_PUBKEY_CURRENT_COUNT 9U

#define BBN_LEAF_HASH_NULL 0U
#define BBN_LEAF_HASH_DISPALY 1U
Expand Down
Loading
Loading