VegaSec self-audit reference
We run VegaSec against fictional internal fixtures so buyers can see what a vulnerable vs remediated Solidity contract looks like through the same pipeline used on real submissions.
Remediation delta
Total findings removed
+9
Critical + high removed
+5
Actionable findings removed
+8
Positive numbers mean the fixed fixture has fewer findings of that class than the vulnerable fixture. They do not mean the fixed fixture has been verified by a human auditor.
Deterministic cockpit fixture
Reference audit replay
Honest stage-by-stage view of what VegaSec ran against this contract. Automated stages do not replace a human operator review.
Audit intake
Passed320ms replay12:00 PMNormalize the submitted contract target and confirm it can enter the Solidity audit lane.
Source acquisition
Passed1.4s replay12:00 PMResolve pasted source or verified explorer source without treating malformed input as demo data.
Toolchain validation
Passed2.3s replay12:00 PMConfirm the configured static analyzers can run and produce parseable output.
Static analysis
Passed7 findings8.8s replay12:00 PMRun static analyzers against the sandboxed source and collect raw detector evidence.
Finding normalization
Passed7 findings1.1s replay12:00 PMDedupe detectors, classify vulnerability classes and compute severity-weighted risk.
Exploitability review
Partial7 findings1.9s replay12:00 PMFrame automated findings with conservative exploitability and limitation notes.
- Automated exploitability review is conservative and does not replace a manual exploitability assessment.
Remediation draft
Partial7 findings1.5s replay12:00 PMPrepare remediation-oriented evidence for the shareable report artifact.
- Remediation notes are generated from detector evidence and require project-specific engineering review.
Operator review
Blocked0ms replay12:00 PMRecord whether a human operator artifact exists before buyer escalation.
- No operator review artifact is attached to this automated scan.
- Human operator review has not been attached to this automated scan yet.
Finalization
Partial7 findings620ms replay12:00 PMPublish the automated report artifact or explain why the scan failed closed.
Artifact: Automated Solidity report · vega-self-audit-vulnerable
- Final report is an automated static-analysis artifact; no operator review artifact is attached.
Before remediation
VegaTokenVulnerable.sol
Intentionally unsafe Solidity fixture used to demonstrate VegaSec's automated detectors.
Solidity evidence report
9 audit findings
Severity distribution
Executive summary
- 9 findings surfaced (3 critical, 2 high, 2 medium, 1 low, 1 informational).
- CRITICAL · tx.origin is used for authorization in the vulnerable self-audit fixture. — exploitability unknown.
- CRITICAL · Low-level value transfer to msg.sender occurs before effects are applied. — exploitability unknown.
- CRITICAL · selfdestruct is reachable in the vulnerable self-audit fixture. — exploitability unknown.
- Automated static analysis only. A human operator review has not been attached to this report.
- criticalAccess controlDetector: semgrep
tx.origin is used for authorization in the vulnerable self-audit fixture.
Evidence
tx.origin is used for authorization in the vulnerable self-audit fixture.
VegaTokenVulnerable.sol:24require(tx.origin == owner, "origin owner only");
Exploitability notes
Analyzer did not report a confidence level; treat as unverified until reviewed.
Remediation
Gate privileged functions behind a tested role/ownership pattern (e.g. OpenZeppelin Ownable/AccessControl). Avoid tx.origin for authorization.
- criticalUnchecked callDetector: semgrep
Low-level value transfer to msg.sender occurs before effects are applied.
Evidence
Low-level value transfer to msg.sender occurs before effects are applied.
VegaTokenVulnerable.sol:39(bool ok,) = payable(msg.sender).call{value: amount}("");Exploitability notes
Analyzer did not report a confidence level; treat as unverified until reviewed.
Remediation
Check the boolean return of low-level call/delegatecall/send and revert on failure with a descriptive reason string.
- criticalCentralizationDetector: semgrep
selfdestruct is reachable in the vulnerable self-audit fixture.
Evidence
selfdestruct is reachable in the vulnerable self-audit fixture.
VegaTokenVulnerable.sol:47selfdestruct(payable(owner));
Exploitability notes
Analyzer did not report a confidence level; treat as unverified until reviewed.
Remediation
Document the trust boundary, set up time-locked multisig ownership, and surface admin-only functions in the deployment runbook.
- highAccess controlConfidence: highExploitability: highDetector: slither
VegaTokenVulnerable.mintForReview uses tx.origin for authorization. A phishing contract can preserve the original owner origin while changing msg.sender.
Evidence
VegaTokenVulnerable.mintForReview uses tx.origin for authorization. A phishing contract can preserve the original owner origin while changing msg.sender.
Exploitability notes
High-confidence detection of a severe pattern; treat as exploitable until disproven by manual review.
Remediation
Gate privileged functions behind a tested role/ownership pattern (e.g. OpenZeppelin Ownable/AccessControl). Avoid tx.origin for authorization.
- highAccess controlConfidence: highExploitability: highDetector: slither
VegaTokenVulnerable.retireFixture can selfdestruct the contract behind an unsafe origin check.
Evidence
VegaTokenVulnerable.retireFixture can selfdestruct the contract behind an unsafe origin check.
Exploitability notes
High-confidence detection of a severe pattern; treat as exploitable until disproven by manual review.
Remediation
Gate privileged functions behind a tested role/ownership pattern (e.g. OpenZeppelin Ownable/AccessControl). Avoid tx.origin for authorization.
- mediumTimestamp dependenceDetector: semgrep
block.timestamp influences reviewer selection and should not be treated as randomness.
Evidence
block.timestamp influences reviewer selection and should not be treated as randomness.
VegaTokenVulnerable.sol:30picked = reviewers[block.timestamp % reviewers.length];
Exploitability notes
Analyzer did not report a confidence level; treat as unverified until reviewed.
Remediation
Treat block.timestamp as a coarse value with miner influence; prefer block-number windows for short-term invariants and add tolerance bands.
- mediumOracle manipulationConfidence: mediumExploitability: mediumDetector: slither
VegaTokenVulnerable.unsafeReviewerLottery derives selection from block.timestamp, which is not safe randomness.
Evidence
VegaTokenVulnerable.unsafeReviewerLottery derives selection from block.timestamp, which is not safe randomness.
Exploitability notes
Medium-confidence detection; manual review required before relying on the finding either way.
Remediation
Use multi-source price feeds (e.g. Chainlink + TWAPs) and validate freshness/deviation before consuming oracle data on-chain.
- lowCentralizationDetector: semgrep
Hardcoded reviewer address creates centralization and rotation risk in this fixture.
Evidence
Hardcoded reviewer address creates centralization and rotation risk in this fixture.
VegaTokenVulnerable.sol:12address public reviewer = 0x1111111111111111111111111111111111111111;
Exploitability notes
Analyzer did not report a confidence level; treat as unverified until reviewed.
Remediation
Document the trust boundary, set up time-locked multisig ownership, and surface admin-only functions in the deployment runbook.
- informationalUnchecked callConfidence: highExploitability: lowDetector: slither
VegaTokenVulnerable.withdrawReviewCredit uses a low-level call to msg.sender.
Evidence
VegaTokenVulnerable.withdrawReviewCredit uses a low-level call to msg.sender.
Exploitability notes
Informational signal; not directly exploitable without additional context.
Remediation
Check the boolean return of low-level call/delegatecall/send and revert on failure with a descriptive reason string.
Audit pipeline
Audit cockpit
Honest stage-by-stage view of what VegaSec ran against this contract. Automated stages do not replace a human operator review.
Audit intake
Passed320ms replay12:00 PMNormalize the submitted contract target and confirm it can enter the Solidity audit lane.
Source acquisition
Passed1.4s replay12:00 PMResolve pasted source or verified explorer source without treating malformed input as demo data.
Toolchain validation
Passed2.3s replay12:00 PMConfirm the configured static analyzers can run and produce parseable output.
Static analysis
Passed9 findings8.8s replay12:00 PMRun static analyzers against the sandboxed source and collect raw detector evidence.
Finding normalization
Passed9 findings1.1s replay12:00 PMDedupe detectors, classify vulnerability classes and compute severity-weighted risk.
Exploitability review
Partial9 findings1.9s replay12:00 PMFrame automated findings with conservative exploitability and limitation notes.
- Automated exploitability review is conservative and does not replace a manual exploitability assessment.
Remediation draft
Partial9 findings1.5s replay12:00 PMPrepare remediation-oriented evidence for the shareable report artifact.
- Remediation notes are generated from detector evidence and require project-specific engineering review.
Operator review
Blocked0ms replay12:00 PMRecord whether a human operator artifact exists before buyer escalation.
- No operator review artifact is attached to this automated scan.
- Human operator review has not been attached to this automated scan yet.
Finalization
Partial9 findings620ms replay12:00 PMPublish the automated report artifact or explain why the scan failed closed.
Artifact: Automated Solidity report · vega-self-audit-vulnerable
- Final report is an automated static-analysis artifact; no operator review artifact is attached.
After remediation
VegaTokenFixed.sol
Remediated counterpart of the vulnerable fixture, showing what the static-analysis report looks like once the obvious patterns are addressed.
Solidity evidence report
0 audit findings
Executive summary
- No detector raised a finding against the submitted source. This is not a guarantee of safety; manual review remains required.
- Automated static analysis only. A human operator review has not been attached to this report.
Audit pipeline
Audit cockpit
Honest stage-by-stage view of what VegaSec ran against this contract. Automated stages do not replace a human operator review.
Audit intake
Passed320ms replay12:00 PMNormalize the submitted contract target and confirm it can enter the Solidity audit lane.
Source acquisition
Passed1.4s replay12:00 PMResolve pasted source or verified explorer source without treating malformed input as demo data.
Toolchain validation
Passed2.3s replay12:00 PMConfirm the configured static analyzers can run and produce parseable output.
Static analysis
Passed0 findings8.8s replay12:00 PMRun static analyzers against the sandboxed source and collect raw detector evidence.
Finding normalization
Passed0 findings1.1s replay12:00 PMDedupe detectors, classify vulnerability classes and compute severity-weighted risk.
Exploitability review
Partial0 findings1.9s replay12:00 PMFrame automated findings with conservative exploitability and limitation notes.
- Automated exploitability review is conservative and does not replace a manual exploitability assessment.
Remediation draft
Partial0 findings1.5s replay12:00 PMPrepare remediation-oriented evidence for the shareable report artifact.
- Remediation notes are generated from detector evidence and require project-specific engineering review.
Operator review
Blocked0ms replay12:00 PMRecord whether a human operator artifact exists before buyer escalation.
- No operator review artifact is attached to this automated scan.
- Human operator review has not been attached to this automated scan yet.
Finalization
Partial0 findings620ms replay12:00 PMPublish the automated report artifact or explain why the scan failed closed.
Artifact: Automated Solidity report · vega-self-audit-fixed
- Final report is an automated static-analysis artifact; no operator review artifact is attached.