Datasets:
prompt stringlengths 102 194k | chosen stringlengths 128 10.1k | rejected stringlengths 17 10.2k | source stringclasses 3
values | defect stringclasses 15
values | negatives stringclasses 2
values |
|---|---|---|---|---|---|
Analyze the following smart contract security concern:
Protocol: Dango DEX
Issue: Asymmetric liquidity provision to geometric pool can allow attacker to purchase at flat oracle price, irrespective of trade size.
Provide a detailed security analysis including severity, description, impact, and recommendations. | ## High: Asymmetric liquidity provision to geometric pool can allow attacker to purchase at flat oracle price, irrespective of trade size.
### Description
Asymmetric liquidity provision to geometric pool can allow attacker to purchase at flat oracle price, irrespective of trade size.
### Impact
This allows an attacke... | ## High: Asymmetric liquidity provision to geometric pool can allow attacker to purchase at flat oracle price, irrespective of trade size.
### Description
Asymmetric liquidity provision to geometric pool can allow attacker to purchase at flat oracle price, irrespective of trade size. This occurs because the geometric ... | oxdev/smart-contract-security-audit-v2 | unsupported | defect-injection:deepseek/deepseek-v4-flash-0731 |
Review this smart contract code and identify any security issues:
```solidity
function getInterestRateFromPoolUtilization(uint256 _deposited, uint256 _borrowed)
external view override returns (uint256, uint256) {
// if zero borrows and nonzero deposits, then set interest rate for period to
// the rate inte... | ## Low: Array Out-Of-Bounds
### Description
## getInterestRateFromPoolUtilization Issue
`getInterestRateFromPoolUtilization` in `PiecewiseInterestRate` may revert if `_borrowed` exceeds `_deposited`.
Specifically, the issue is in the loop that iterates through the `model.kinks` array to obtain the appropriate range... | ## Low: Array Out-Of-Bounds
### Description
## getInterestRateFromPoolUtilization Issue
`getInterestRateFromPoolUtilization` in `PiecewiseInterestRate` may revert if `_borrowed` exceeds `_deposited`.
Specifically, the issue is in the loop that iterates through the `model.kinks` array to obtain the appropriate range... | oxdev/smart-contract-security-audit-v2 | factual_error | defect-injection:deepseek/deepseek-v4-flash-0731 |
Security review of vulnerable code in openjpeg (C).
```C
static void opj_get_encoding_parameters(const opj_image_t *p_image,
const opj_cp_t *p_cp,
OPJ_UINT32 p_tileno,
OPJ_INT32 * p_tx0,
... | Findings for CVE-2018-20847 in openjpeg (C):
- Location: https://github.com/uclouvain/openjpeg/pull/1168/commits/c58df149900df862806d0e892859b41115875845
- Weakness: CWE-190 (Integer Overflow or Wraparound)
- What is wrong: the code above contains a vulnerability fixed by commit c58df149900d. Commit message: [OPENJP2] ... | Findings for CVE-2018-20847 in openjpeg (C):
- Location: https://github.com/uclouvain/openjpeg/pull/1168/commits/c58df149900df862806d0e892859b41115875845
- Weakness: CWE-190 (Integer Overflow or Wraparound)
- What is wrong: the code above contains a vulnerability fixed by commit c58df149900d. Commit message: [OPENJP2] ... | bstee615/bigvul | unsupported | defect-injection:deepseek/deepseek-v4-flash-0731 |
As a smart contract auditor, analyze this potential vulnerability:
Protocol: Sophon Farming Program
Concern: Missing Storage Gaps | ## Low: Missing Storage Gaps
### Description
**Update**
Marked as "Acknowledged" by the client. The client provided the following explanation:
> Care will always be taken during upgrades to ensure there are no storage collisions. By convention, state variables will never be added directly to SophonFarming.sol, but ra... | ## Low: Missing Storage Gaps
### Description
**Update**
Marked as "Acknowledged" by the client. The client provided the following explanation:
> Care will always be taken during upgrades to ensure there are no storage collisions. By convention, state variables will never be added directly to SophonFarming.sol, but ra... | oxdev/smart-contract-security-audit-v2 | unsupported | defect-injection:deepseek/deepseek-v4-flash-0731 |
Security review of vulnerable code in launchpad (CPP).
```CPP
base::WeakPtr<OTRBrowserContextImpl> GetWeakPtr() {
return weak_ptr_factory_.GetWeakPtr();
}
``` | Findings for CVE-2016-1586 in launchpad (CPP):
- Location: https://git.launchpad.net/oxide/commit/?id=29014da83e5fc358d6bff0f574e9ed45e61a35ac
- Weakness: CWE-20 (Improper Input Validation)
- What is wrong: the code above contains a vulnerability fixed by commit 29014da83e5f. Commit message:
- Severity: high - this is... | Findings for CVE-2016-1586 in launchpad (CPP):
- Location: https://git.launchpad.net/oxide/commit/?id=29014da83e5fc358d6bff0f574e9ed45e61a35ac
- Weakness: CWE-20 (Improper Input Validation)
- What is wrong: the code above contains a vulnerability fixed by commit 29014da83e5f. Commit message: This fixes a use-after-free... | bstee615/bigvul | unsupported | defect-injection:deepseek/deepseek-v4-flash-0731 |
Committed evidence for modules/slotmem/mod_slotmem_shm.c:
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the A... | type: memory safety
preconditions: caller invokes slotmem_get with dest_len greater than the configured slot size
proof:
dest_len is an API argument to slotmem_get and is not validated against slot->desc->size.
slotmem_dptr returns a pointer to slot id's fixed-size slot at slot->base + size * id.
memcpy(dest, ptr... | type: memory safety
preconditions: caller invokes slotmem_get with dest_len greater than the configured slot size
proof:
dest_len is an API argument to slotmem_get and is not validated against slot->desc->size.
slotmem_dptr returns a pointer to slot id's fixed-size slot at slot->base + size * id.
memcpy(dest, ptr... | jedisct1/security-audits | wrong_remedy | defect-injection:deepseek/deepseek-v4-flash-0731 |
Audit this smart contract code from the prePO protocol (areas of concern: Business Logic):
```solidity
File: apps/smart-contracts/core/contracts/interfaces/IWithdrawHook.sol
63: /**
64: * @notice Sets the length in seconds for which user withdraw limits will
65: * be evaluated against. Every time `userPeriodLe... | To withdraw, a user needs to convert his collateral for the base token. This is done in the **withdraw** function in Collateral.
The WithdrawHook has some security mechanics that can be activated like a global max withdraw in a specific timeframe, also for users to have a withdraw limit for them in a specific timefram... | To withdraw, a user needs to convert his collateral for the base token. This is done in the **withdraw** function in Collateral.
The WithdrawHook has some security mechanics that can be activated like a global max withdraw in a specific timeframe, also for users to have a withdraw limit for them in a specific timefram... | oxdev/smart-contract-security-audit-v2 | factual_error | defect-injection:deepseek/deepseek-v4-flash-0731 |
Security review of vulnerable code in Android (C).
```C
status_t OMXNodeInstance::prepareForAdaptivePlayback(
OMX_U32 portIndex, OMX_BOOL enable, OMX_U32 maxFrameWidth,
OMX_U32 maxFrameHeight) {
Mutex::Autolock autolock(mLock);
CLOG_CONFIG(prepareForAdaptivePlayback, "%s:%u en=%d max=%ux%u... | Findings for CVE-2016-6720 in Android (C):
- Location: https://android.googlesource.com/platform/frameworks/av/+/0f177948ae2640bfe4d70f8e4248e106406b3b0a
- Weakness: CWE-200 (Exposure of Sensitive Information)
- What is wrong: the code above contains a vulnerability fixed by commit 0f177948ae26. Commit message: DO NOT ... | Findings for CVE-2016-6720 in Android (C):
- Location: https://android.googlesource.com/platform/frameworks/av/+/0f177948ae2640bfe4d70f8e4248e106406b3b0a
- Weakness: CWE-200 (Exposure of Sensitive Information)
- What is wrong: the code above contains a vulnerability fixed by commit 0f177948ae26. Commit message: DO NOT ... | bstee615/bigvul | wrong_remedy | defect-injection:deepseek/deepseek-v4-flash-0731 |
As a smart contract auditor, analyze this potential vulnerability:
Protocol: Cron Finance
Concern: Join Events must be explicitly transfered to recipient after transfering Balancer Pool Tokens in order to realize the full value of the tokens | ## Low: Join Events must be explicitly transfered to recipient after transfering Balancer Pool Tokens in order to realize the full value of the tokens
### Description
Any user receiving LP tokens transferred to them must be explicitly transferred with a join event in order to redeem the full value of the LP tokens on ... | ## Low: Join Events must be explicitly transfered to recipient after transfering Balancer Pool Tokens in order to realize the full value of the tokens
### Description
Any user receiving LP tokens transferred to them must be explicitly transferred with a join event in order to redeem the full value of the LP tokens on ... | oxdev/smart-contract-security-audit-v2 | wrong_remedy | defect-injection:deepseek/deepseek-v4-flash-0731 |
Repository profile:
{
"summary": "an apache httpd c server with apr dependencies and a mod_autoindex generator for on-the-fly html directory indexes.",
"languages": [
"c"
],
"frameworks": [
"apr",
"apache httpd module api"
],
"entry_points": [
"server/main.c",
"modules/generators/mod_aut... | priority: ESCALATE_MEDIUM
confidence: medium
summary: filename extensions can select handlers and filters from request-derived path metadata
bug_class: unsafe_data_flow
bug_class: trust_boundary_breaks
bug_class: business_logic
relevant_symbol: find_ct
relevant_symbol: ModMimeUsePathInfo
relevant_symbol: AddHandler
rel... | priority: ESCALATE_MEDIUM
confidence: medium
summary: filename extensions can select handlers and filters from request-derived path metadata, and the extension parser is also reachable from the server configuration directives trust boundary
bug_class: unsafe_data_flow
bug_class: trust_boundary_breaks
bug_class: busines... | jedisct1/security-audits | unsupported | defect-injection:deepseek/deepseek-v4-flash-0731 |
Repository profile:
{
"summary": "an apache httpd c server with apr dependencies and a mod_autoindex generator for on-the-fly html directory indexes.",
"languages": [
"c"
],
"frameworks": [
"apr",
"apache httpd module api"
],
"entry_points": [
"server/main.c",
"modules/generators/mod_aut... | priority: SKIP
confidence: high
summary: test optional function declaration only, no reachable security-sensitive behavior
needs_followup: false | priority: SKIP confidence: high confidence: high summary: test optional function declaration only, but deployment should disable optional function probing in production builds to prevent module enu | jedisct1/security-audits | degenerate:spliced | degenerate-synthetic |
As a smart contract auditor, analyze this code:
```solidity
function claimVotingRewardBatch(
address[] memory _votingRewardList,
uint256 _tokenId
) external {
if (veKitten.isApprovedOrOwner(msg.sender, _tokenId) == false)
revert NotApprovedOrOwner();
for (uint256 i; i <... | ## Low: `claimVotingRewardBatch()` allows early claims, missing rewards
### Description
_Resolved_
In the `Voter` contract, the `claimVotingRewardBatch()` function enables voters to claim their accumulated voting rewards from the associated `VotingReward` contracts for the gauges they have voted on:
However, this f... | ## Low: `claimVotingRewardBatch()` allows early claims, missing rewards
### Description
_Resolved_
In the `Voter` contract, the `claimVotingRewardBatch()` function enables voters to claim their accumulated voting rewards from the associated `VotingReward` contracts for the gauges they have voted on:
However, this f... | oxdev/smart-contract-security-audit-v2 | wrong_remedy | defect-injection:deepseek/deepseek-v4-flash-0731 |
Analyze the following smart contract security concern:
Protocol: AegisVault
Issue: Users can avoid paying target token fees
Provide a detailed security analysis including severity, description, impact, and recommendations. | ## Low: Users can avoid paying target token fees
### Description
When `AegisVaultCore.performUpKeep` is called by the rebalancer keeper there is a fee that is applied over the target tokens being rebalanced, and the fee is sent to the `feeRecipient` address.
Users can avoid paying their share of the fee by calling th... | ## Low: Users can avoid paying target token fees
### Description
When `AegisVaultCore.performUpKeep` is called by the rebalancer keeper there is a fee that is applied over the target tokens being rebalanced, and the fee is sent to the `feeRecipient` address.
Users can avoid paying their share of the fee by calling th... | oxdev/smart-contract-security-audit-v2 | unsupported | defect-injection:deepseek/deepseek-v4-flash-0731 |
Repository profile:
{
"summary": "an apache httpd c server with apr dependencies and a mod_autoindex generator for on-the-fly html directory indexes.",
"languages": [
"c"
],
"frameworks": [
"apr",
"apache httpd module api"
],
"entry_points": [
"server/main.c",
"modules/generators/mod_aut... | priority: ESCALATE_MEDIUM
confidence: medium
summary: fd proxy URL path reaches Unix socket connect and client fd passing with minimal local validation
bug_class: trust_boundary_breaks
bug_class: unsafe_data_flow
bug_class: path_traversal
relevant_symbol: proxy_fdpass_canon
relevant_symbol: proxy_fdpass_handler
relevan... | Published confirm github version read name function value treat; Return file exact severity confirm affected! Check request user path above data verify struct. Request value treat unreachable github contains struct path. User weakness unreachable path unless. Below longer contains struct patched null return confirm. Ap... | jedisct1/security-audits | degenerate:keyword_salad | degenerate-synthetic |
Security review of vulnerable code in Chrome (C).
```C
media::AudioParameters GetDeviceParametersOnDeviceThread(
media::AudioManager* audio_manager,
const std::string& unique_id) {
DCHECK(audio_manager->GetTaskRunner()->BelongsToCurrentThread());
return media::AudioDeviceDescription::IsDefaultDevice(unique... | Findings for CVE-2015-1265 in Chrome (C):
- Location: https://github.com/chromium/chromium/commit/04ff52bb66284467ccb43d90800013b89ee8db75
- Weakness:
- What is wrong: the code above contains a vulnerability fixed by commit 04ff52bb6628. Commit message: Switching AudioOutputAuthorizationHandler from using AudioManager... | Above exact struct null data commit type read treat check. Case code description name buffer unreachable scanner; Return name before description struct after. Check code modules above treat file upstream path. Error applying wrong patched unreachable https re-run; Path contains message function published char buffer de... | bstee615/bigvul | degenerate:keyword_salad | degenerate-synthetic |
Committed evidence for modules/http/byterange_filter.c:
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apa... | type: data integrity bug
preconditions: response brigade contains known-length buckets whose total exceeds apr_off_t maximum
proof:
bucket lengths enter ap_byterange_filter from the output brigade.
the loop adds each e->length into apr_off_t clength without overflow checks.
if the accumulated total wraps, range p... | Const longer case vulnerability wrong value function exploitable published. File struct above applying case fixed request return unless proven; Confirm contains exact unreachable verify treat modules! Code case const null upstream modules severity. Exact re-run char apply proven error const function! Const location fin... | jedisct1/security-audits | degenerate:keyword_salad | degenerate-synthetic |
Committed evidence for modules/md/md_store.c:
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache Licens... | @@ expansion @@
type: validation gap
preconditions: caller supplies md_pkey_spec_name containing path separators
proof:
md_pkey_filename calls pk_filename with md_pkey_spec_name(spec) at line 271.
pk_filename concatenates keyname into base.keyname.pem at line 265 and only lowercases it.
md_pkey_load/save then pas... | @@ expansion @@
type: validation gap
preconditions: caller supplies md_pkey_spec_name containing path separators
proof:
md_pkey_filename calls pk_filename with md_pkey_spec_name(spec) at line 271.
pk_filename concatenates keyname into base.keyname.pem at line 265 and only uppercases it.
md_pkey_load/save then pas... | jedisct1/security-audits | factual_error | defect-injection:deepseek/deepseek-v4-flash-0731 |
Repository profile:
{
"summary": "an apache httpd c server with apr dependencies and a mod_autoindex generator for on-the-fly html directory indexes.",
"languages": [
"c"
],
"frameworks": [
"apr",
"apache httpd module api"
],
"entry_points": [
"server/main.c",
"modules/generators/mod_aut... | priority: SKIP
confidence: high
summary: test header only declares an optional hook with no implementation or reachable request handling
needs_followup: false | priority: SKIP
confidence: high
summary: test header only declares an optional hook with no implementation or reachable request handling, and | jedisct1/security-audits | factual_error | defect-injection:deepseek/deepseek-v4-flash-0731 |
Security review of vulnerable code in qemu (C).
```C
ssize_t pcnet_receive(NetClientState *nc, const uint8_t *buf, size_t size_)
{
PCNetState *s = qemu_get_nic_opaque(nc);
int is_padr = 0, is_bcast = 0, is_ladr = 0;
uint8_t buf1[60];
int remaining;
int crc_err = 0;
int size = size_;
if (CS... | Findings for CVE-2015-7512 in qemu (C):
- Location: https://git.qemu.org/?p=qemu.git;a=commit;h=8b98a2f07175d46c3f7217639bd5e03f
- Weakness: CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer (buffer overflow))
- What is wrong: the code above contains a vulnerability fixed by commit 8b98a2... | Findings for CVE-2015-7512 in qemu (C):
- Location: https://git.qemu.org/?p=qemu.git;a=commit;h=8b98a2f07175d46c3f7217639bd5e03f
- Weakness: CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer (buffer overflow))
- What is wrong: the code above contains a vulnerability fixed by commit 8b98a2... | bstee615/bigvul | wrong_remedy | defect-injection:deepseek/deepseek-v4-flash-0731 |
SECURITY_REVIEW
A preference dataset for SECURITY_REVIEW, harvested from real, human-labelled sources and curated by an automated harvesting harness with an LLM quality gate.
Format
Standard preference / DPO schema — each row:
| column | meaning |
|---|---|
prompt |
the request (originally prompt) |
chosen |
the human-preferred response |
rejected |
a worse response to the same prompt |
source |
the dataset/URL the row was harvested from |
Splits
80/10/10 train / validation / test (seeded shuffle): train:1989 / validation:248 / test:250
Stats
- Rows: 2487
- Distinct sources: 3
Sources
bstee615/bigvuljedisct1/security-auditsoxdev/smart-contract-security-audit-v2
Provenance
prompt and chosen are real — harvested from the human-labelled sources listed above (accepted / upvoted / high-rated responses).
rejected is partly synthetic. Most sources retain only the accepted answer, so where no genuine low-scored counterpart existed the negative was generated by defect injection: an LLM rewrites that row's own chosen with exactly one flaw introduced (omission, factual error, wrong remedy, unsupported claim, or misprioritisation) at matched length. Rows carrying a defect column are the generated ones; rows without it kept a negative that was present in the source.
Rows passed a per-row check (negative is unique, not a stub, not spliced from chosen) and a whole-corpus gate for repeated negatives, length shortcuts, train/eval leakage and bag-of-words separability.
- Downloads last month
- 54