{"analyzer_versions":{"semgrep":"1.163.0"},"body":{"audit_stages":[{"blockers":[],"completed_at":"2026-10-03T19:53:45.144Z","description":"Normalize the submitted contract target and confirm it can enter the Solidity audit lane.","elapsed_ms":320,"id":"intake","label":"Audit intake","limitations":[],"next_step":"Acquire verified source or scan the pasted Solidity source.","order":1,"status":"passed"},{"blockers":[],"completed_at":"2026-10-03T19:53:45.144Z","description":"Resolve pasted source or verified explorer source without treating malformed input as demo data.","elapsed_ms":1450,"id":"source_acquisition","label":"Source acquisition","limitations":[],"next_step":"Validate the analyzer toolchain against the acquired source.","order":2,"status":"passed"},{"blockers":[],"completed_at":"2026-10-03T19:53:45.144Z","description":"Confirm the configured static analyzers can run and produce parseable output.","elapsed_ms":2300,"id":"toolchain_validation","label":"Toolchain validation","limitations":[],"next_step":"Run static analysis and capture raw detector evidence.","order":3,"status":"passed"},{"blockers":[],"completed_at":"2026-10-03T19:53:45.144Z","description":"Run static analyzers against the sandboxed source and collect raw detector evidence.","elapsed_ms":8800,"findings_count":21,"id":"static_analysis","label":"Static analysis","limitations":[],"next_step":"Normalize detector output into one deduped finding set.","order":4,"status":"passed"},{"blockers":[],"completed_at":"2026-10-03T19:53:45.144Z","description":"Dedupe detectors, classify vulnerability classes and compute severity-weighted risk.","elapsed_ms":1150,"findings_count":21,"id":"finding_normalization","label":"Finding normalization","limitations":[],"next_step":"Review exploitability conservatively against confidence and limitations.","order":5,"status":"passed"},{"blockers":[],"completed_at":"2026-10-03T19:53:45.144Z","description":"Frame automated findings with conservative exploitability and limitation notes.","elapsed_ms":1900,"findings_count":21,"id":"exploitability_review","label":"Exploitability review","limitations":["Automated exploitability review is conservative and does not replace a manual exploitability assessment."],"next_step":"Draft remediation notes from the normalized evidence.","order":6,"status":"partial"},{"blockers":[],"completed_at":"2026-10-03T19:53:45.144Z","description":"Prepare remediation-oriented evidence for the shareable report artifact.","elapsed_ms":1500,"findings_count":21,"id":"remediation_draft","label":"Remediation draft","limitations":["Remediation notes are generated from detector evidence and require project-specific engineering review."],"next_step":"Attach an operator review artifact before claiming human review.","order":7,"status":"partial"},{"blockers":["No operator review artifact is attached to this automated scan."],"completed_at":"2026-10-03T19:53:45.144Z","description":"Record whether a human operator artifact exists before buyer escalation.","elapsed_ms":0,"id":"operator_review","label":"Operator review","limitations":["Human operator review has not been attached to this automated scan yet."],"next_step":"Attach a real operator review artifact before claiming human review.","order":8,"status":"blocked"},{"artifact":{"created_at":"2026-10-03T19:53:45.144Z","id":"solidity-2f746d702f766567","label":"Automated Solidity report","type":"report"},"blockers":[],"completed_at":"2026-10-03T19:53:45.144Z","description":"Publish the automated report artifact or explain why the scan failed closed.","elapsed_ms":620,"findings_count":21,"id":"finalization","label":"Finalization","limitations":["Final report is an automated static-analysis artifact; no operator review artifact is attached."],"next_step":"Share the report with explicit limitations and review state.","order":9,"status":"partial"}],"counts":{"access-control":0,"centralization":0,"flash-loan":0,"front-running":0,"gas-dos":1,"logic":18,"math-overflow":0,"oracle-manipulation":1,"other":0,"reentrancy":1,"timestamp-dependence":0,"unchecked-call":0,"uninitialized":0},"executive_summary":["21 findings surfaced (0 critical, 2 high, 0 medium, 0 low, 19 informational).","HIGH · Deck.deal(address,uint8) (bad-randomness-blackjack.sol#15-22) uses a weak PRNG: \"uint8(uint256(keccak256()(block.blockhash(b),player,cardNumber,timestamp)) % 52 (deal) — exploitability medium.","HIGH · BlackJack (bad-randomness-blackjack.sol#45-308) contract sets array length with a user-controlled value: (BlackJack) — exploitability medium.","Automated static analysis only. A human operator review has not been attached to this report."],"findings":[{"class":"oracle-manipulation","component":"deal","confidence":"medium","description":"Deck.deal(address,uint8) (bad-randomness-blackjack.sol#15-22) uses a weak PRNG: \"uint8(uint256(keccak256()(block.blockhash(b),player,cardNumber,timestamp)) % 52) (bad-randomness-blackjack.sol#21)\" \n","end_line":22,"exploitability":"medium","exploitability_note":"Medium-confidence detection; manual review required before relying on the finding either way.","file":"bad-randomness-blackjack.sol","id":"77561c06740e0877399a1f58d78ab8d9754526920887642439da28c13a474936","line":15,"references":["https://github.com/crytic/slither/wiki/Detector-Documentation#weak-prng"],"remediation":"Use multi-source price feeds (e.g. Chainlink + TWAPs) and validate freshness/deviation before consuming oracle data on-chain.","rule_id":"slither:weak-prng","severity":"high","source":"slither","title":"Deck.deal(address,uint8) (bad-randomness-blackjack.sol#15-22) uses a weak PRNG: \"uint8(uint256(keccak256()(block.blockhash(b),player,cardNumber,timestamp)) % 52"},{"class":"gas-dos","component":"BlackJack","confidence":"medium","description":"BlackJack (bad-randomness-blackjack.sol#45-308) contract sets array length with a user-controlled value:\n\t- games[msg.sender].houseCards.push(newCard) (bad-randomness-blackjack.sol#149)\n","end_line":308,"exploitability":"medium","exploitability_note":"Medium-confidence detection; manual review required before relying on the finding either way.","file":"bad-randomness-blackjack.sol","id":"28fd5ca69c8dc9f8ea41a5c9a7472ea30a59df5829272801b3d5e0cc58ab3837","line":45,"references":["https://github.com/crytic/slither/wiki/Detector-Documentation#controlled-array-length"],"remediation":"Cap loop bounds, paginate iteration, and ensure no user can grow a state structure the contract must traverse to make progress.","rule_id":"slither:controlled-array-length","severity":"high","source":"slither","title":"BlackJack (bad-randomness-blackjack.sol#45-308) contract sets array length with a user-controlled value:"},{"class":"logic","component":"^0.4.9","confidence":"high","description":"Version constraint ^0.4.9 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html)\n\t- DirtyBytesArrayToStorage\n\t- KeccakCaching\n\t- EmptyByteArrayCopy\n\t- DynamicArrayCleanup\n\t- ImplicitConstructorCallvalueCheck\n\t- TupleAssignmentMultiStackSlotComponents\n\t- MemoryArrayCreationOverflow\n\t- privateCanBeOverridden\n\t- SignedArrayStorageCopy\n\t- UninitializedFunctionPointerInConstructor_0.4.x\n\t- IncorrectEventSignatureInLibraries_0.4.x\n\t- ExpExponentCleanup\n\t- NestedArrayFunctionCallDecoder\n\t- ZeroFunctionSelector\n\t- DelegateCallReturnValue\n\t- ECRecoverMalformedInput\n\t- SkipEmptyStringLiteral\n\t- ConstantOptimizerSubtraction.\nIt is used by:\n\t- ^0.4.9 (bad-randomness-blackjack.sol#8)\n","exploitability":"low","exploitability_note":"Informational signal; not directly exploitable without additional context.","file":"bad-randomness-blackjack.sol","id":"685fa1974d0f5343e81a846c2a65890606188ba6d1361556dcd87b944e33c00d","line":8,"references":["https://github.com/crytic/slither/wiki/Detector-Documentation#solc-version"],"remediation":"Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.","rule_id":"slither:solc-version","severity":"informational","source":"slither","title":"Version constraint ^0.4.9 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html)"},{"class":"logic","component":"uint8(uint256(keccak256()(block.blockhash(b),player,cardNumber,timestamp)) % 52)","confidence":"high","description":"Deprecated standard detected uint8(uint256(keccak256()(block.blockhash(b),player,cardNumber,timestamp)) % 52) (bad-randomness-blackjack.sol#21):\n\t- Usage of \"block.blockhash()\" should be replaced with \"blockhash()\"\n","exploitability":"low","exploitability_note":"Informational signal; not directly exploitable without additional context.","file":"bad-randomness-blackjack.sol","id":"6e5c8533846e46587e0c1dc9470d5ddeb2ddcdbe8fe739b0ceabf11942b11cb0","line":21,"references":["https://github.com/crytic/slither/wiki/Detector-Documentation#deprecated-standards"],"remediation":"Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.","rule_id":"slither:deprecated-standards","severity":"informational","source":"slither","title":"Deprecated standard detected uint8(uint256(keccak256()(block.blockhash(b),player,cardNumber,timestamp)) % 52) (bad-randomness-blackjack.sol#21):"},{"class":"logic","component":"minBet","confidence":"high","description":"BlackJack.minBet (bad-randomness-blackjack.sol#48) should be constant \n","exploitability":"low","exploitability_note":"Informational signal; not directly exploitable without additional context.","file":"bad-randomness-blackjack.sol","id":"7beb290e7b1c486ae1ded16ab48c0871ee6f1639990e34be843f58128e6e00c5","line":48,"references":["https://github.com/crytic/slither/wiki/Detector-Documentation#constable-states"],"remediation":"Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.","rule_id":"slither:constable-states","severity":"informational","source":"slither","title":"BlackJack.minBet (bad-randomness-blackjack.sol#48) should be constant"},{"class":"logic","component":"maxBet","confidence":"high","description":"BlackJack.maxBet (bad-randomness-blackjack.sol#49) should be constant \n","exploitability":"low","exploitability_note":"Informational signal; not directly exploitable without additional context.","file":"bad-randomness-blackjack.sol","id":"7c1e0380ec5ab859f33a2bd74f5e61f85e3c6f0b33c8ca0b97b7ab94525628a1","line":49,"references":["https://github.com/crytic/slither/wiki/Detector-Documentation#constable-states"],"remediation":"Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.","rule_id":"slither:constable-states","severity":"informational","source":"slither","title":"BlackJack.maxBet (bad-randomness-blackjack.sol#49) should be constant"},{"class":"logic","component":"BLACKJACK","confidence":"high","description":"BlackJack.BLACKJACK (bad-randomness-blackjack.sol#51) should be constant \n","exploitability":"low","exploitability_note":"Informational signal; not directly exploitable without additional context.","file":"bad-randomness-blackjack.sol","id":"a0ed1ed6e014de6effe85b205b3127d626553d47ad9daa8893c5a386b70aaf30","line":51,"references":["https://github.com/crytic/slither/wiki/Detector-Documentation#constable-states"],"remediation":"Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.","rule_id":"slither:constable-states","severity":"informational","source":"slither","title":"BlackJack.BLACKJACK (bad-randomness-blackjack.sol#51) should be constant"},{"class":"logic","component":"BLACKJACK","confidence":"high","description":"Variable BlackJack.BLACKJACK (bad-randomness-blackjack.sol#51) is not in mixedCase\n","exploitability":"low","exploitability_note":"Informational signal; not directly exploitable without additional context.","file":"bad-randomness-blackjack.sol","id":"a79597a30cbea5f3d4f42cf143d6134182a169628262b7fd1d2b7e7951192309","line":51,"references":["https://github.com/crytic/slither/wiki/Detector-Documentation#naming-convention"],"remediation":"Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.","rule_id":"slither:naming-convention","severity":"informational","source":"slither","title":"Variable BlackJack.BLACKJACK (bad-randomness-blackjack.sol#51) is not in mixedCase"},{"class":"logic","confidence":"high","description":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#70):\n\t- Usage of \"throw\" should be replaced with \"revert()\"\n","exploitability":"low","exploitability_note":"Informational signal; not directly exploitable without additional context.","file":"bad-randomness-blackjack.sol","id":"c1cecbc3589249e344520eefc6745fc4208f4f8b1f435437327128784eec0b05","line":70,"references":["https://github.com/crytic/slither/wiki/Detector-Documentation#deprecated-standards"],"remediation":"Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.","rule_id":"slither:deprecated-standards","severity":"informational","source":"slither","title":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#70):"},{"class":"logic","confidence":"high","description":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#102):\n\t- Usage of \"throw\" should be replaced with \"revert()\"\n","exploitability":"low","exploitability_note":"Informational signal; not directly exploitable without additional context.","file":"bad-randomness-blackjack.sol","id":"07dfb17d16f20debf9e15827e3c234d37b384bb495cccca3883755549be4b960","line":102,"references":["https://github.com/crytic/slither/wiki/Detector-Documentation#deprecated-standards"],"remediation":"Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.","rule_id":"slither:deprecated-standards","severity":"informational","source":"slither","title":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#102):"},{"class":"logic","confidence":"high","description":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#106):\n\t- Usage of \"throw\" should be replaced with \"revert()\"\n","exploitability":"low","exploitability_note":"Informational signal; not directly exploitable without additional context.","file":"bad-randomness-blackjack.sol","id":"b7f25139ec95609c40131a9e57ccaefb375adf8faed317df2b29a5a08e293c9c","line":106,"references":["https://github.com/crytic/slither/wiki/Detector-Documentation#deprecated-standards"],"remediation":"Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.","rule_id":"slither:deprecated-standards","severity":"informational","source":"slither","title":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#106):"},{"class":"reentrancy","component":"checkGameResult","confidence":"medium","description":"Reentrancy in BlackJack.checkGameResult(BlackJack.Game,bool) (bad-randomness-blackjack.sol#159-247):\n\tExternal calls:\n\t- ! msg.sender.send(game.bet * 2) (bad-randomness-blackjack.sol#240)\n\tState variables written after the call(s):\n\t- games[msg.sender].state = GameState.Player (bad-randomness-blackjack.sol#241)\n","end_line":247,"exploitability":"low","exploitability_note":"Informational signal; not directly exploitable without additional context.","file":"bad-randomness-blackjack.sol","id":"24963f1dfeade5dbf3841e6f23ecf7766fef930a77ae148cd08e44bec2023005","line":159,"references":["https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-unlimited-gas"],"remediation":"Apply the checks-effects-interactions pattern. State writes must happen before external calls, and consider OpenZeppelin's ReentrancyGuard for high-risk entry points.","rule_id":"slither:reentrancy-unlimited-gas","severity":"informational","source":"slither","title":"Reentrancy in BlackJack.checkGameResult(BlackJack.Game,bool) (bad-randomness-blackjack.sol#159-247):"},{"class":"logic","confidence":"high","description":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#170):\n\t- Usage of \"throw\" should be replaced with \"revert()\"\n","exploitability":"low","exploitability_note":"Informational signal; not directly exploitable without additional context.","file":"bad-randomness-blackjack.sol","id":"9cf86a6f498adcd3fabe5d5d69c41e476b06540516473760da65f4a6040fdcd0","line":170,"references":["https://github.com/crytic/slither/wiki/Detector-Documentation#deprecated-standards"],"remediation":"Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.","rule_id":"slither:deprecated-standards","severity":"informational","source":"slither","title":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#170):"},{"class":"logic","confidence":"high","description":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#183):\n\t- Usage of \"throw\" should be replaced with \"revert()\"\n","exploitability":"low","exploitability_note":"Informational signal; not directly exploitable without additional context.","file":"bad-randomness-blackjack.sol","id":"a0140c7c4ac2de368e047474116da3c1385a568000bf456b3a5447ea58714987","line":183,"references":["https://github.com/crytic/slither/wiki/Detector-Documentation#deprecated-standards"],"remediation":"Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.","rule_id":"slither:deprecated-standards","severity":"informational","source":"slither","title":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#183):"},{"class":"logic","confidence":"high","description":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#186):\n\t- Usage of \"throw\" should be replaced with \"revert()\"\n","exploitability":"low","exploitability_note":"Informational signal; not directly exploitable without additional context.","file":"bad-randomness-blackjack.sol","id":"8b2005dea5f2f70f72f8c609d5487ff1931ee84aa78e823efb12a3f910221fc0","line":186,"references":["https://github.com/crytic/slither/wiki/Detector-Documentation#deprecated-standards"],"remediation":"Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.","rule_id":"slither:deprecated-standards","severity":"informational","source":"slither","title":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#186):"},{"class":"logic","confidence":"high","description":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#223):\n\t- Usage of \"throw\" should be replaced with \"revert()\"\n","exploitability":"low","exploitability_note":"Informational signal; not directly exploitable without additional context.","file":"bad-randomness-blackjack.sol","id":"ed7b83cef2d37f12a82235ee6bfcbd7f707fab3359b4a3237c3fa0364d228e96","line":223,"references":["https://github.com/crytic/slither/wiki/Detector-Documentation#deprecated-standards"],"remediation":"Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.","rule_id":"slither:deprecated-standards","severity":"informational","source":"slither","title":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#223):"},{"class":"logic","confidence":"high","description":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#236):\n\t- Usage of \"throw\" should be replaced with \"revert()\"\n","exploitability":"low","exploitability_note":"Informational signal; not directly exploitable without additional context.","file":"bad-randomness-blackjack.sol","id":"82c1d6522b7253dc69d566f15172583b220ebc57087272eb71deac76d9e36312","line":236,"references":["https://github.com/crytic/slither/wiki/Detector-Documentation#deprecated-standards"],"remediation":"Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.","rule_id":"slither:deprecated-standards","severity":"informational","source":"slither","title":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#236):"},{"class":"logic","confidence":"high","description":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#240):\n\t- Usage of \"throw\" should be replaced with \"revert()\"\n","exploitability":"low","exploitability_note":"Informational signal; not directly exploitable without additional context.","file":"bad-randomness-blackjack.sol","id":"ee4a41fbf4e4e4c6579533bcc694dcbf01a40b5d7acf22e3dc1cb480e50df1d7","line":240,"references":["https://github.com/crytic/slither/wiki/Detector-Documentation#deprecated-standards"],"remediation":"Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.","rule_id":"slither:deprecated-standards","severity":"informational","source":"slither","title":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#240):"},{"class":"logic","confidence":"high","description":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#268):\n\t- Usage of \"throw\" should be replaced with \"revert()\"\n","exploitability":"low","exploitability_note":"Informational signal; not directly exploitable without additional context.","file":"bad-randomness-blackjack.sol","id":"a9305f0c732847a1b3921353fcfbaba386a5924a131bbd369aac421168d9db83","line":268,"references":["https://github.com/crytic/slither/wiki/Detector-Documentation#deprecated-standards"],"remediation":"Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.","rule_id":"slither:deprecated-standards","severity":"informational","source":"slither","title":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#268):"},{"class":"logic","confidence":"high","description":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#275):\n\t- Usage of \"throw\" should be replaced with \"revert()\"\n","exploitability":"low","exploitability_note":"Informational signal; not directly exploitable without additional context.","file":"bad-randomness-blackjack.sol","id":"43dffac235a80c6c060fec68f9cc70393e5617f7351c1c47febdd4c2bf86e0bc","line":275,"references":["https://github.com/crytic/slither/wiki/Detector-Documentation#deprecated-standards"],"remediation":"Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.","rule_id":"slither:deprecated-standards","severity":"informational","source":"slither","title":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#275):"},{"class":"logic","confidence":"high","description":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#290):\n\t- Usage of \"throw\" should be replaced with \"revert()\"\n","exploitability":"low","exploitability_note":"Informational signal; not directly exploitable without additional context.","file":"bad-randomness-blackjack.sol","id":"e02bd7ad0b08fcbdc8a2d59a6490fdf430c34c2a1dd75d1e74f6d2aff5ead837","line":290,"references":["https://github.com/crytic/slither/wiki/Detector-Documentation#deprecated-standards"],"remediation":"Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.","rule_id":"slither:deprecated-standards","severity":"informational","source":"slither","title":"Deprecated standard detected THROW (bad-randomness-blackjack.sol#290):"}],"limitations":["VegaSec runs static analysis only. Findings can include false positives, miss patterns the configured detectors do not cover, and never replace manual auditor judgement.","Scan ran slither and semgrep against a single sandboxed copy of the source. Multi-file dependency analysis beyond what slither resolves automatically is out of scope.","This report is not a certification, audit attestation, or financial advice."],"warnings":[]},"canonical_version":"vss-canonical-1","coverage_status":"complete","final_score":80,"findings_count":21,"generated_at":"2026-10-03T19:53:45.144Z","id":"VSS-20261003-U2NB6NB6","severity_counts":{"critical":0,"high":2,"informational":19,"low":0,"medium":0},"source_filename":"bad-randomness-blackjack.sol","source_hash":"35fddfbd32c24d934617f8da3e75adeebaa269a086bd34e50ce629f4cec17a0e","surface":"solidity","warnings_count":0}