SPB Git

Repository Public

gitleaks.toml 12.5 KB 203 lines toml

1# =============================================================================2#                  SP BOUCHER | SOFTWARE & RESEARCH3#             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING4# =============================================================================5#6# Project          : QYVORA7# File             : security/policies/gitleaks.toml8# Module           : Security9# Repository       : https://git.spboucher.ai/qyvora10# Project Website  : Not specified11# Created          : 2026-12-0412# Last Modified    : 2026-12-0413#14# Author           : Simon-Pierre Boucher15# Position         : Professor of Finance16# Institution      : Université du Québec en Outaouais (UQO)17# Organization     : SP Boucher18# Website          : https://spboucher.ai19# Git              : https://git.spboucher.ai20#21# Preferred Contact: contact@spboucher.ai22# Development      : dev@spboucher.ai23# Support          : support@spboucher.ai24# Security/Admin   : admin@spboucher.ai25#26# Copyright (c) 202627# Simon-Pierre Boucher28# All rights reserved where applicable. This file is governed by the29# applicable project license, copyright notices and relevant law.30# Existing third-party rights and notices remain unaffected.31#32# License          : None specified (no license file in this repository)33#34# Do not embed credentials, private keys, access tokens,35# certificates or confidential personal information.36#37# =============================================================================38# END OF SP BOUCHER SOURCE HEADER39# =============================================================================4041# Gitleaks configuration of the QYVORA security audit.42# Default rule set of the installed Gitleaks version, plus one QYVORA rule, plus a narrow allowlist.4344title = "QYVORA secret scan"4546[extend]47useDefault = true4849# A BIP-39 mnemonic or an extended private key outside the public test-vector files would be a wallet secret.50[[rules]]51id = "qyvora-extended-private-key"52description = "BIP-32 extended private key (xprv/tprv/zprv/vprv/yprv/uprv)"53regex = '''\b[xtzvyu]prv[1-9A-HJ-NP-Za-km-z]{100,108}\b'''54keywords = ["xprv", "tprv", "zprv", "vprv", "yprv", "uprv"]5556[[allowlists]]57description = "Generated or downloaded material that is not part of the repository (git-ignored): build output, the audit's own tool installation and raw scratch reports."58paths = [59    '''(^|/)\.build/''',60    '''(^|/)\.swiftpm/''',61    '''(^|/)DerivedData/''',62    '''^build/''',63    '''^security/\.tools/''',64    '''^security/reports/raw/''',65    '''^security/fuzzing/work/''',66    '''^\.claude/''',67]6869# --- Public test vectors ------------------------------------------------------------------------------70# Every entry below is a file of published test vectors (or a test file that embeds published vectors).71# The keys they contain are public knowledge and control no funds of ours.7273[[allowlists]]74description = "Vector directories: NIST ACVP / CAVP, RFC and BIP vector files committed with a README giving source, revision and licence (Tests/*/Vectors), and the audit's third-party vector store (security/vectors: Wycheproof, BIP-32/39/173/340/350 files and, since 2026-12-05, the RFC 8032 section 7.1 seeds, the SLIP-0010 ed25519 vectors, the ed25519-speccheck cases, the CashAddr and Bitcoin Cash Node vectors, public main-network transactions of TRON, Litecoin, Dogecoin and Bitcoin Cash; all pinned in MANIFEST.json)."75paths = [76    '''^Tests/[^/]+/Vectors/''',77    '''^security/vectors/''',78]7980[[allowlists]]81description = "BIP-143 and BIP-174 vector tables transcribed from the BIP documents (private keys, scripts and PSBTs published in the BIPs)."82paths = [83    '''^Tests/QyvoraBitcoinTests/BIP143Vectors\.swift$''',84    '''^Tests/QyvoraBitcoinTests/BIP174Vectors\.swift$''',85]8687[[allowlists]]88description = "Published extended private keys used as test inputs: BIP-32 test vector 1 master key (HDTests.swift), BIP-32 / BIP-380 keys of the descriptor vectors (DescriptorTests.swift), BIP-174 master key tprv8ZgxMBicQKsPd9TeAd… (PSBTTests.swift). Verified on 2026-12-04: the xprv values also appear in security/vectors/bip/bip-0032-vectors.json. Limited to the extended-private-key rule in these three files."89condition = "AND"90targetRules = ["qyvora-extended-private-key"]91paths = [92    '''^Tests/QyvoraCoreTests/HDTests\.swift$''',93    '''^Tests/QyvoraBitcoinTests/DescriptorTests\.swift$''',94    '''^Tests/QyvoraBitcoinTests/PSBTTests\.swift$''',95]96regexTarget = "line"97regexes = ['''[xt]prv''']9899[[allowlists]]100description = "generic-api-key false positives on public values in test files: compressed public keys of the BIP-380 vectors (DescriptorTests.swift key1/key2), the BIP-84 account zpub (AccountTests.swift), the published BIP-174 master key again under this rule (PSBTTests.swift), benchmark identifiers such as ml-kem-768.keygen (BenchmarkTests.swift). None is a secret of ours. Limited to that rule and to these exact line shapes in these four files."101condition = "AND"102targetRules = ["generic-api-key"]103regexTarget = "line"104paths = [105    '''^Tests/QyvoraBitcoinTests/DescriptorTests\.swift$''',106    '''^Tests/QyvoraBitcoinTests/AccountTests\.swift$''',107    '''^Tests/QyvoraBitcoinTests/PSBTTests\.swift$''',108    '''^Tests/QyvoraBenchmarksTests/BenchmarkTests\.swift$''',109]110regexes = ['''key[12] = "0[23][0-9a-f]{64}"''', '''zpub[1-9A-HJ-NP-Za-km-z]{100,108}''', '''masterKey = "tprv8ZgxMBicQKsPd9TeAd''', '''ml-kem-768\.keygen''']111112[[allowlists]]113description = "generic-api-key false positive in Sources/QyvoraIdentity/Identity.swift: the assignment `self.x25519PrivateKey = x25519PrivateKey` copies an initializer parameter to a property; there is no literal. Limited to that exact line text."114condition = "AND"115targetRules = ["generic-api-key"]116regexTarget = "line"117paths = ['''^Sources/QyvoraIdentity/Identity\.swift$''']118regexes = ['''self\.x25519PrivateKey = x25519PrivateKey''']119120[[allowlists]]121description = "generic-api-key false positives in Tests/QyvoraWalletTests/PaymentRequestTests.swift (added 2026-12-05, commit 7685b32 and later): two assertions compare the `token` field of a parsed payment request with a PUBLIC contract address — the USDC contract on Ethereum (0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48, also in the built-in token table of Sources/QyvoraEthereum/ERC20.swift) and the USDC mint on Solana (EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v, also in Sources/QyvoraSolana/SolanaTokens.swift). The rule fires on the word `token` followed by a long literal. Neither value is a secret. Limited to that rule, that file and those two exact values. Proposed by the agent that wrote the test, for the integrator to confirm."122condition = "AND"123targetRules = ["generic-api-key"]124regexTarget = "line"125paths = ['''^Tests/QyvoraWalletTests/PaymentRequestTests\.swift$''']126regexes = ['''token == "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"''', '''token == "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"''']127128# --- The one entry that is not a test-vector file --------------------------------------------------------129[[allowlists]]130description = "generic-api-key false positive in security/policies/dontrust.json: SHA-256 checksums of rule files (`\"<name>.yaml\": \"<64 hex>\"`), recorded to pin what was examined. A checksum is not a secret. Limited to that rule, that file and that line shape."131condition = "AND"132targetRules = ["generic-api-key"]133regexTarget = "line"134paths = ['''^security/policies/dontrust\.json$''']135regexes = ['''\.ya?ml": "[0-9a-f]{64}"''']136137# --- Audit engine and public keys (added when the first full run flagged them; none is a secret) -----------138[[allowlists]]139description = "The BIP-32 test vector 1 master key (xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3…, published in BIP-32) used inside the audit engine as a canary that proves the secret detectors fire (security/audit/mobsf/selftest.py, security/audit/runners). Limited to that exact key under security/audit/."140condition = "AND"141regexTarget = "line"142paths = ['''^security/audit/''']143regexes = ['''xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi''']144145[[allowlists]]146description = "generic-api-key false positives in the review notes of the audit (security/audit/review/*.json): English prose describing where secrets live in the code ('secret, HKDF/PBKDF2/Argon2 output…'), no value. Limited to that rule and that directory."147condition = "AND"148targetRules = ["generic-api-key"]149paths = ['''^security/audit/review/[^/]+\.json$''']150regexes = ['''.''']151regexTarget = "line"152153[[allowlists]]154description = "generic-api-key on BIP-32 extended PUBLIC keys (xpub/tpub/zpub/vpub/ypub/upub) assigned to a variable whose name contains 'key'. A public key is not a credential (it is watch-only material; the ones in the tree are published test vectors, e.g. the BIP-84 account key in the DEBUG-only App/Sources/Wallet/DebugWalletLaunch.swift). Limited to that rule and to lines carrying such a key."155condition = "AND"156targetRules = ["generic-api-key"]157regexTarget = "line"158regexes = ['''"[xtzvyu]pub[1-9A-HJ-NP-Za-km-z]{100,108}"''']159160[[allowlists]]161description = "Seed inputs of the fuzzer for the extended-key parser (security/fuzzing/corpus/extended-key, and reproducer files under crashes/): xprv/tprv/zprv/vprv strings derived by security/tests/Sources/FuzzTargets/Targets+Encoding.swift (bip32Seeds) from a fixed, public pseudo-random seed (fixtureBytes(\"bip32\"): FNV hash of the label fed to the test generator), and mutations of them. They are test inputs that anyone can regenerate from the source; no wallet ever used them. Limited to the extended-private-key rule in these two directories."162condition = "AND"163targetRules = ["qyvora-extended-private-key"]164paths = [165    '''^security/fuzzing/corpus/extended-key/''',166    '''^security/fuzzing/crashes/extended-key/''',167]168169[[allowlists]]170description = "The generated audit reports (security/reports/SECURITY_AUDIT_RESULTS.json and the reports rendered from it). They quote the evidence of findings, including the text matched by this scanner and by the others, so scanning them would report every match a second time. A secret can only reach a report by being quoted from a file of the repository, where it is detected at its source. Limited to the files directly under security/reports/."171paths = ['''^security/reports/[^/]+$''']172173# --- Multi-chain upgrade (2026-12-05): public values in the new test files, added entry by entry ------------174[[allowlists]]175description = "generic-api-key on `\"TokenAddress\":\"0x…\"` in stub answers of an Etherscan-style token-balance API: public ERC-20 contract addresses (USDt and USDC on Avalanche in Tests/QyvoraNetworkingTests/EVMNetworkingTests.swift; the EIP-55 sample address 0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed in a seed of the fuzz corpus json-evm-indexer-dialects). A contract address is not a credential. The same addresses are compared in the expectations of that test (`tokenAddress == \"0x…\"`). Limited to that rule, these two places and these two line shapes."176condition = "AND"177targetRules = ["generic-api-key"]178regexTarget = "line"179paths = [180    '''^Tests/QyvoraNetworkingTests/EVMNetworkingTests\.swift$''',181    '''^security/fuzzing/corpus/json-evm-indexer-dialects/''',182]183regexes = ['''"TokenAddress":"0x[0-9a-fA-F]{40}"''', '''tokenAddress == "0x[0-9a-fA-F]{40}"''']184185[[allowlists]]186description = "generic-api-key on TRON reference vectors (Tests/QyvoraTronTests/ReferenceVectors.swift, TransactionTests.swift): the Base58 address of the public USDT TRC-20 contract (TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t) passed as `token:`, and the identifier, the 65-byte signature and the owner address of a public main-network transaction (`tokenTxID`, `tokenSignature`, `tokenOwner`). All of it is on the public chain; a signature is not a key. Limited to that rule, these two files and these line shapes."187condition = "AND"188targetRules = ["generic-api-key"]189regexTarget = "line"190paths = [191    '''^Tests/QyvoraTronTests/ReferenceVectors\.swift$''',192    '''^Tests/QyvoraTronTests/TransactionTests\.swift$''',193]194regexes = ['''token: "T[1-9A-HJ-NP-Za-km-z]{33}"''', '''static let token(TxID|Signature|Owner) = "''']195196[[allowlists]]197description = "generic-api-key on the made-up TronGrid key of the test `theTronGridKeyLivesInTheVaultOnly` (Tests/QyvoraWalletTests/MultiChainSendTests.swift): the literal 0f1e2d3c-4b5a-6978-8796-a5b4c3d2e1f0 is a descending-nibble pattern written for the test, given to a stub transport, and was never issued by TronGrid. Limited to that rule, that file and that exact literal."198condition = "AND"199targetRules = ["generic-api-key"]200regexTarget = "line"201paths = ['''^Tests/QyvoraWalletTests/MultiChainSendTests\.swift$''']202regexes = ['''let key = "0f1e2d3c-4b5a-6978-8796-a5b4c3d2e1f0"''']203
Files main
Menu

Theme