Datasets:
instruction large_stringclasses 25
values | input large_stringlengths 100 4.8k | output large_stringlengths 801 5.57k |
|---|---|---|
Audit dynamic query concatenation and OS command execution paths. | # container should never be needed here
for sub_container in value:
func = getattr(self, "my_visit_" + type(sub_container).__name__)
some_container.append(func(sub_container))
else:
raise TypeError(
"All `_block_fiel... | ## Technical Audit: Injection Vulnerabilities (SQLi/Command)
- **Language / Framework**: PY
- **Analysis Category**: Injection Vulnerabilities (SQLi/Command)
- **Primary Finding**: Injection audit: Enforce parameterized queries and safe command invocation.
### Code Block Under Review (PY)
```py
# container should neve... |
Audit access control checks, privilege escalation vectors, and session scope. | from typing import Any, Dict, List, Tuple
import attr
from .. import acr, ast
@attr.s(auto_attribs=True)
class AnalysisContext:
modules: List[acr.Module]
results: Dict[str, Any] = attr.ib(init=False, factory=dict)
def unpack(self) -> Tuple[List[acr.Module], Dict[str, Any]]:
return self.modules,... | ## Technical Audit: Auth & Privilege Logic Audit
- **Language / Framework**: PY
- **Analysis Category**: Auth & Privilege Logic Audit
- **Primary Finding**: Authorization audit: Role-based boundary enforcement and access checks.
### Code Block Under Review (PY)
```py
from typing import Any, Dict, List, Tuple
import a... |
Evaluate conditional branching depth. | "a": {1: 5},
"b": {10: 11, 12: 13},
}
class Child3(Child2):
a = {3: 4}
b = {12: 0}
assert all_attrs(Child3()) == {
DICTS: {"a", "b"},
"a": {1: 5, 3: 4},
"b": {10: 11, 12: 0},
}
def test_removal():
class Parent(InheritDicts):
_dicts_to_inher... | ## Technical Audit: Cyclomatic Complexity
- **Language / Framework**: PY
- **Analysis Category**: Cyclomatic Complexity
- **Primary Finding**: Branching complexity: Cyclomatic index within clean maintenance threshold.
### Code Block Under Review (PY)
```py
"a": {1: 5},
"b": {10: 11, 12: 13},
}
class C... |
Verify hash algorithms, key storage, and RNG randomness. | if err != nil {
return errors.Wrap(err, "write into temporary file")
}
log.Println("inserted payload")
// update go build args
for i := range args {
if args[i] == originPath {
args[i] = tmpEntryFile
}
}
log.Printf("temp file strored at %s\n", tmpEntryFile)
return nil
}
// buildDependence store the pat... | ## Technical Audit: Cryptographic Implementation Audit
- **Language / Framework**: GO
- **Analysis Category**: Cryptographic Implementation Audit
- **Primary Finding**: Crypto audit: Validated against deprecated ciphers and weak PRNG usage.
### Code Block Under Review (GO)
```go
if err != nil {
return errors.Wrap(er... |
Audit deployment manifests, permissions, and hardcoded exposures. | from flask import Flask, request, render_template
import time
import sys
import os
app = Flask(__name__)
# Global variables to simulate resource exhaustion
memory_usage = []
request_count = 0
start_time = time.time()
CRASH_THRESHOLD = 5000 # Lower threshold for faster crash
MAX_REQUESTS = 20 # Lower max requests
@... | ## Technical Audit: Infrastructure & IaC Security
- **Language / Framework**: PY
- **Analysis Category**: Infrastructure & IaC Security
- **Primary Finding**: IaC Security: Least privilege and configuration hardening checked.
### Code Block Under Review (PY)
```py
from flask import Flask, request, render_template
impo... |
Audit dynamic query concatenation and OS command execution paths. | }
input[type="submit"]:hover {
background-color: #004d99;
}
.footer {
text-align: center;
padding: 1rem;
background-color: #003366;
color: white;
position: fixed;
bottom: 0;
width: 100%;
}
... | ## Technical Audit: Injection Vulnerabilities (SQLi/Command)
- **Language / Framework**: HTML
- **Analysis Category**: Injection Vulnerabilities (SQLi/Command)
- **Primary Finding**: Injection audit: Enforce parameterized queries and safe command invocation.
### Code Block Under Review (HTML)
```html
}
input[t... |
Inspect pointer arithmetic, buffer allocations, and lifetime management. | blockSize = blockSize || 16;
var lines = [];
var hex = "0123456789ABCDEF";
for (var b = 0; b < buffer.length; b += blockSize) {
var block = buffer.slice(b, Math.min(b + blockSize, buffer.length));
var addr = ("0000" + b.toString(16)).slice(-4);
var codes = block.split('').map(functio... | ## Technical Audit: Memory Corruption & Safety
- **Language / Framework**: JS
- **Analysis Category**: Memory Corruption & Safety
- **Primary Finding**: Memory safety audit: Pointer safety, bound checks, and lifetime validation.
### Code Block Under Review (JS)
```js
blockSize = blockSize || 16;
var lines = [];
... |
Inspect pointer arithmetic, buffer allocations, and lifetime management. | State(state): State<Arc<AppState>>,
Json(req): Json<ScraperRequest>,
) -> ScraperResponse {
// Check auth token
if let Some(ref expected) = state.auth_token {
match &req.auth_token {
Some(token) if token == expected => {}
_ => return ScraperResponse::error(401, "Unauthorized"... | ## Technical Audit: Memory Corruption & Safety
- **Language / Framework**: RS
- **Analysis Category**: Memory Corruption & Safety
- **Primary Finding**: Memory safety audit: Pointer safety, bound checks, and lifetime validation.
### Code Block Under Review (RS)
```rs
State(state): State<Arc<AppState>>,
Json(req): ... |
Evaluate exception handling and error boundary. | //! Core chaser-cf implementation
//!
//! This module provides the main `ChaserCF` API for browser automation
//! with stealth capabilities.
mod browser;
mod config;
mod solver;
pub use browser::BrowserManager;
pub use config::ChaserConfig;
use crate::error::{ChaserError, ChaserResult};
use crate::models::{ProxyConf... | ## Technical Audit: Error Handling Strategy
- **Language / Framework**: RS
- **Analysis Category**: Error Handling Strategy
- **Primary Finding**: Exception boundary: Structured exception raising, catching, and logging.
### Code Block Under Review (RS)
```rs
//! Core chaser-cf implementation
//!
//! This module provid... |
Inspect template escaping, DOM manipulation, and inline scripts. | ///
/// # Returns
///
/// The Turnstile token string.
pub async fn solve_turnstile_min(
&self,
url: &str,
site_key: &str,
proxy: Option<ProxyConfig>,
) -> ChaserResult<String> {
let browser = self.browser().await?;
let manager = browser.as_ref().ok_or(... | ## Technical Audit: Web Frontend Security (XSS/DOM)
- **Language / Framework**: RS
- **Analysis Category**: Web Frontend Security (XSS/DOM)
- **Primary Finding**: Client-side security: Context-aware HTML escaping and DOM sanitization verified.
### Code Block Under Review (RS)
```rs
///
/// # Returns
///
//... |
Generate boundary and edge-case unit test scenarios. | "GitHub URL": compile(r"(?i)github.*['\"][0-9a-zA-Z]{35,40}['\"]"),
# GitLab
"GitLab Personal Access Token": compile(r'glpat-[0-9a-zA-Z\-_]{20}'),
# Slack
"Slack Token": compile(
r'xox[pboa]-[0-9]{12}-[0-9]{12}-[0-9]{12}-[a-z0-9]{32}'
),
"Slack Webhook": compile(
r'https://hook... | ## Technical Audit: Unit Test Cases
- **Language / Framework**: PY
- **Analysis Category**: Unit Test Cases
- **Primary Finding**: Unit test strategy: Normal execution, boundary limits, and error handling covered.
### Code Block Under Review (PY)
```py
"GitHub URL": compile(r"(?i)github.*['\"][0-9a-zA-Z]{35,40}['\"]")... |
Extract technical interface contract and specifications. | """
sender.py - Thread-safe sender for ESP32 USB bulk OUT endpoint.
"""
import threading
import time
import usb.core
_DEFAULT_TIMEOUT_MS = 3000 # USB write timeout
_MAX_RETRIES = 2
class Sender:
def __init__(self, device, ep_out_addr: int, log_func=None,
timeout_ms: int = _DEFAULT_TIME... | ## Technical Audit: API Spec Documentation
- **Language / Framework**: PY
- **Analysis Category**: API Spec Documentation
- **Primary Finding**: Technical API Contract: Explicit input/output schema mapping.
### Code Block Under Review (PY)
```py
"""
sender.py - Thread-safe sender for ESP32 USB bulk OUT endpoint.
"""
... |
Extract technical interface contract and specifications. | """CLI entry point — ``python3 -m pagecache_guard [options] [paths...]``."""
import os
import sys
import signal
import time
import argparse
import logging
import logging.handlers
from .fanotify_handler import FanotifyHandler, scan_suid_files
from .inode_watcher import setup_inode_marks
from .periodic_scanner import P... | ## Technical Audit: API Spec Documentation
- **Language / Framework**: PY
- **Analysis Category**: API Spec Documentation
- **Primary Finding**: Technical API Contract: Explicit input/output schema mapping.
### Code Block Under Review (PY)
```py
"""CLI entry point — ``python3 -m pagecache_guard [options] [paths...]``.... |
Evaluate against Object-Oriented SOLID architecture. | addend = addend.double()
n >>= 1
return result
def __repr__(self):
return (
"Point(infinity)" if self.is_at_infinity() else f"Point({self.x}, {self.y})"
)
def is_at_infinity(self): # Special null point
return self.x is None and self.y is None
class Cu... | ## Technical Audit: SOLID Principles
- **Language / Framework**: PY
- **Analysis Category**: SOLID Principles
- **Primary Finding**: SOLID Compliance: Single responsibility and interface segregation verified.
### Code Block Under Review (PY)
```py
addend = addend.double()
n >>= 1
return result
... |
Analyze time complexity and execution bounds. | writer.writerow({'User': user, 'Number of Commits': commits})
# Main function
def main():
display_ascii_art()
parser = argparse.ArgumentParser(description='Verifies unique active contributors to GitHub repositories.')
parser.add_argument('-d', '--days', type=int, required=True, help='Number of days to chec... | ## Technical Audit: Big-O Time Complexity
- **Language / Framework**: PY
- **Analysis Category**: Big-O Time Complexity
- **Primary Finding**: Algorithmic profile: Worst-case complexity bounded within performance limits.
### Code Block Under Review (PY)
```py
writer.writerow({'User': user, 'Number of Commits': commits... |
Evaluate against Object-Oriented SOLID architecture. | {a}Mini Wp-Exploiter 2020
{a}Store(telegram) : @dxdteam | @Shop_Unknowns
{b}[{a}Developer{b}] : {a}Escanor 0xTN
{b}[{a}1{b}]{a} Sites
{b}[{a}2{b}]{a} sites/Ips+reverse ip (bing)
""".format(a="\033[94m", b="\033[92m")
i5tar=raw_input('%s0xtn> %s'%('\033[92m','\033[00m'))
sites = open(raw_input('\033[94m[\033[92mSit... | ## Technical Audit: SOLID Principles
- **Language / Framework**: PY
- **Analysis Category**: SOLID Principles
- **Primary Finding**: SOLID Compliance: Single responsibility and interface segregation verified.
### Code Block Under Review (PY)
```py
{a}Mini Wp-Exploiter 2020
{a}Store(telegram) : @dxdteam | @Shop_Unknow... |
Evaluate exception handling and error boundary. | and child_name in ("Name", "UnaryOp", "Attribute")
):
raise Invalid
if parents[-1] == ("MatchValue", "value") and child_name == "Name":
raise Invalid
if inside("MatchClass.cls"):
if child_name not in ("Name", "Attribute"):
raise Invalid
if parents[-1] == ("comprehe... | ## Technical Audit: Error Handling Strategy
- **Language / Framework**: PY
- **Analysis Category**: Error Handling Strategy
- **Primary Finding**: Exception boundary: Structured exception raising, catching, and logging.
### Code Block Under Review (PY)
```py
and child_name in ("Name", "UnaryOp", "Attribute")
):
... |
Verify hash algorithms, key storage, and RNG randomness. | args=[arg(arg="name_3", type_comment="some text")],
vararg=arg(arg="name_2"),
kwonlyargs=[arg(arg="name_4", type_comment="")],
kw_defaults=[Name(id="name_1", ctx=Load())],
kwarg=arg(arg="name_0", type_comment... | ## Technical Audit: Cryptographic Implementation Audit
- **Language / Framework**: PY
- **Analysis Category**: Cryptographic Implementation Audit
- **Primary Finding**: Crypto audit: Validated against deprecated ciphers and weak PRNG usage.
### Code Block Under Review (PY)
```py
args=[arg(arg="name_3", type_comment="s... |
Refactor code into modern idiomatic syntax. | from ast import And
from ast import AugAssign
from ast import BoolOp
from ast import Load
from ast import LShift
from ast import Module
from ast import Name
tree = Module(
body=[
AugAssign(
target=BoolOp(
op=And(),
values=[Name(id="name_1", ctx=Load()), Name(id="... | ## Technical Audit: Modern Refactoring
- **Language / Framework**: PY
- **Analysis Category**: Modern Refactoring
- **Primary Finding**: Idiomatic refactoring applied for operational efficiency and readability.
### Code Block Under Review (PY)
```py
from ast import And
from ast import AugAssign
from ast import BoolOp
... |
Audit access control checks, privilege escalation vectors, and session scope. | from ast import arguments
from ast import comprehension
from ast import DictComp
from ast import FunctionDef
from ast import Global
from ast import Load
from ast import Match
from ast import match_case
from ast import MatchSingleton
from ast import Module
from ast import Name
from ast import NamedExpr
from ast import S... | ## Technical Audit: Auth & Privilege Logic Audit
- **Language / Framework**: PY
- **Analysis Category**: Auth & Privilege Logic Audit
- **Primary Finding**: Authorization audit: Role-based boundary enforcement and access checks.
### Code Block Under Review (PY)
```py
from ast import arguments
from ast import comprehen... |
Examine race conditions and sync hazards. | )
],
type_ignores=[],
)
# version: 3.11.0
# seed = 8805753
#
# Source:
# def name_0():
# match {name_0: (name_3 := name_3) for name_4 in name_1}:
# case 19:
# global name_3
#
#
# Error:
# SyntaxError("name 'name_3' is assigned to before global declaration") | ## Technical Audit: Concurrency & Thread Safety
- **Language / Framework**: PY
- **Analysis Category**: Concurrency & Thread Safety
- **Primary Finding**: Concurrency audit: Safe state mutation under parallel contexts.
### Code Block Under Review (PY)
```py
)
],
type_ignores=[],
)
# version: 3.11.0
# seed = 8... |
Evaluate exception handling and error boundary. | )
],
type_ignores=[],
)
# version: 3.11.0
# seed = 8805753
#
# Source:
# def name_0():
# match {name_0: (name_3 := name_3) for name_4 in name_1}:
# case 19:
# global name_3
#
#
# Error:
# SyntaxError("name 'name_3' is assigned to before global declaration") | ## Technical Audit: Error Handling Strategy
- **Language / Framework**: PY
- **Analysis Category**: Error Handling Strategy
- **Primary Finding**: Exception boundary: Structured exception raising, catching, and logging.
### Code Block Under Review (PY)
```py
)
],
type_ignores=[],
)
# version: 3.11.0
# seed = ... |
Audit dynamic query concatenation and OS command execution paths. | from ast import AnnAssign
from ast import arg
from ast import arguments
from ast import ClassDef
from ast import FunctionDef
from ast import Load
from ast import Module
from ast import Name
from ast import Nonlocal
from ast import Store
tree = Module(
body=[
FunctionDef(
name="name_3",
... | ## Technical Audit: Injection Vulnerabilities (SQLi/Command)
- **Language / Framework**: PY
- **Analysis Category**: Injection Vulnerabilities (SQLi/Command)
- **Primary Finding**: Injection audit: Enforce parameterized queries and safe command invocation.
### Code Block Under Review (PY)
```py
from ast import AnnAssi... |
Inspect dynamic allocation and unclosed resources. | async def test_lock():
with something:
def acquire_lock():
return (yield from lock) | ## Technical Audit: Memory Leak Check
- **Language / Framework**: PY
- **Analysis Category**: Memory Leak Check
- **Primary Finding**: Resource handling: Deterministic cleanup and allocation disposal verified.
### Code Block Under Review (PY)
```py
async def test_lock():
with something:
def acquire_lock()... |
Analyze time complexity and execution bounds. | self.log_file.write(f"[WARNING] [{ts}] {msg}\n")
self.log_file.flush()
def fatal(self, msg):
ts = datetime.datetime.now().strftime("%H:%M:%S")
print(f"{Back.RED}{Fore.WHITE} FATAL {Style.RESET_ALL} [{ts}] {msg}")
self.log_file.write(f"[FATAL] [{ts}] {msg}\n")
self.log_file.f... | ## Technical Audit: Big-O Time Complexity
- **Language / Framework**: PY
- **Analysis Category**: Big-O Time Complexity
- **Primary Finding**: Algorithmic profile: Worst-case complexity bounded within performance limits.
### Code Block Under Review (PY)
```py
self.log_file.write(f"[WARNING] [{ts}] {msg}\n")
se... |
Trace untrusted user inputs from Sources to dangerous Execution Sinks. | self.log_file.write(f"[WARNING] [{ts}] {msg}\n")
self.log_file.flush()
def fatal(self, msg):
ts = datetime.datetime.now().strftime("%H:%M:%S")
print(f"{Back.RED}{Fore.WHITE} FATAL {Style.RESET_ALL} [{ts}] {msg}")
self.log_file.write(f"[FATAL] [{ts}] {msg}\n")
self.log_file.f... | ## Technical Audit: Taint Data-Flow Analysis
- **Language / Framework**: PY
- **Analysis Category**: Taint Data-Flow Analysis
- **Primary Finding**: Data-flow tracing: Unsanitized user input tracking across execution sinks.
### Code Block Under Review (PY)
```py
self.log_file.write(f"[WARNING] [{ts}] {msg}\n")
... |
Evaluate against Object-Oriented SOLID architecture. | print(f"{Back.YELLOW}{Fore.BLACK} WARNING {Style.RESET_ALL} YARA rules, packager detection and ASM->C translation are W.I.P. Expect improvements in future updates.")
print()
def _prompt_path(self):
border = f"{Fore.CYAN}╔═════════════════════════════════════════════════════════════════════════════╗... | ## Technical Audit: SOLID Principles
- **Language / Framework**: PY
- **Analysis Category**: SOLID Principles
- **Primary Finding**: SOLID Compliance: Single responsibility and interface segregation verified.
### Code Block Under Review (PY)
```py
print(f"{Back.YELLOW}{Fore.BLACK} WARNING {Style.RESET_ALL} YARA rules,... |
Analyze query performance, indexing, and N+1 patterns. | Description: The Subnets in which the the LoadBalancer will deployed in (select at least two)
UpdateVariable:
Type: String
Description: Enter a random string. This will ensure that the application instance will always be updated.
Mappings:
RegionMap:
us-east-1:
"HVM64": "ami-00b882ac5193044e4"
... | ## Technical Audit: Database Query Optimization
- **Language / Framework**: YAML
- **Analysis Category**: Database Query Optimization
- **Primary Finding**: Database audit: Optimized query execution path and index usage.
### Code Block Under Review (YAML)
```yaml
Description: The Subnets in which the the LoadBalancer ... |
Audit deployment manifests, permissions, and hardcoded exposures. | return 0;
n = state->x.have;
state->x.have = 0;
}
/* update progress */
len -= n;
buf = (char *)buf + n;
got += n;
state->x.pos += n;
} while (len);
/* return number of bytes read into user buffer */
return got;
}
/* -- see zlib.h --... | ## Technical Audit: Infrastructure & IaC Security
- **Language / Framework**: C
- **Analysis Category**: Infrastructure & IaC Security
- **Primary Finding**: IaC Security: Least privilege and configuration hardening checked.
### Code Block Under Review (C)
```c
return 0;
n = state->x.have;
stat... |
Extract technical interface contract and specifications. | /* check that we're reading and that there's no (serious) error */
if (state->mode != GZ_READ ||
(state->err != Z_OK && state->err != Z_BUF_ERROR))
return 0;
/* compute bytes to read -- error on overflow */
len = nitems * size;
if (size && len / size != nitems) {
gz_error(st... | ## Technical Audit: API Spec Documentation
- **Language / Framework**: C
- **Analysis Category**: API Spec Documentation
- **Primary Finding**: Technical API Contract: Explicit input/output schema mapping.
### Code Block Under Review (C)
```c
/* check that we're reading and that there's no (serious) error */
if (s... |
Analyze memory allocation and heap usage. | /* gzwrite.c -- zlib functions for writing gzip files
* Copyright (C) 2004-2017 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
#include "gzguts.h"
/* Local functions */
local int gz_init OF((gz_statep));
local int gz_comp OF((gz_statep, int));
local int gz_zero OF((gz_statep... | ## Technical Audit: Big-O Space Complexity
- **Language / Framework**: C
- **Analysis Category**: Big-O Space Complexity
- **Primary Finding**: Space allocation profile: Auxiliary stack memory optimized.
### Code Block Under Review (C)
```c
/* gzwrite.c -- zlib functions for writing gzip files
* Copyright (C) 2004-20... |
Audit state transitions, race conditions, and workflow manipulation. | [size, size]
} else {
filesizes
};
self.global.check_parameters([x_size, y_size])
}
/// Starts the alignment of the files, using either global or semiglobal alignment
/// depending on the selection:
/// * If exactly one side is selected, the selected side is aligned ... | ## Technical Audit: Business Logic Vulnerabilities
- **Language / Framework**: RS
- **Analysis Category**: Business Logic Vulnerabilities
- **Primary Finding**: Logic vulnerability check: State machine invariants and anti-tampering logic verified.
### Code Block Under Review (RS)
```rs
[size, size]
} else {
... |
Inspect pointer arithmetic, buffer allocations, and lifetime management. | )
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct linear_penalties_t {
pub match_: ::std::os::raw::c_int,
pub mismatch: ::std::os::raw::c_int,
pub indel: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_linear_penalties_t() {
const UNINIT: ::std::mem::MaybeUninit<linear_penalties_t> ... | ## Technical Audit: Memory Corruption & Safety
- **Language / Framework**: RS
- **Analysis Category**: Memory Corruption & Safety
- **Primary Finding**: Memory safety audit: Pointer safety, bound checks, and lifetime validation.
### Code Block Under Review (RS)
```rs
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]... |
Verify hash algorithms, key storage, and RNG randomness. | fn clear(&mut self);
}
/// Wrapper for crossterm and cursive colors
#[derive(Clone, Copy, Debug)]
pub enum Color {
Unimportant,
HexSame,
HexSameSecondary,
HexDiff,
HexDiffSecondary,
HexOneside,
HexOnesideSecondary,
}
impl Color {
/// Converts to a crossterm color
fn to_cross(self) ... | ## Technical Audit: Cryptographic Implementation Audit
- **Language / Framework**: RS
- **Analysis Category**: Cryptographic Implementation Audit
- **Primary Finding**: Crypto audit: Validated against deprecated ciphers and weak PRNG usage.
### Code Block Under Review (RS)
```rs
fn clear(&mut self);
}
/// Wrapper for... |
Analyze query performance, indexing, and N+1 patterns. | pub fn print_doublehex_scrolled<B: Backend>(
&self,
content: &[DoubleHexLine],
backend: &mut B,
scroll_amount: isize,
print_bars: impl FnOnce(&mut B),
) {
let rows = self.cursor.get_size_y();
if scroll_amount == 0 {
return;
}
if !ba... | ## Technical Audit: Database Query Optimization
- **Language / Framework**: RS
- **Analysis Category**: Database Query Optimization
- **Primary Finding**: Database audit: Optimized query execution path and index usage.
### Code Block Under Review (RS)
```rs
pub fn print_doublehex_scrolled<B: Backend>(
&self,
... |
Trace untrusted user inputs from Sources to dangerous Execution Sinks. | .expect("Could not get align algorithm info from cursive");
let addr_width = settings.style.addr_width;
let new_style = Style {
mode,
ascii_col,
bars_col,
layout: Layout::vertical(vertical),
spacer,
right_to_left,
column_count,
addr_width,
... | ## Technical Audit: Taint Data-Flow Analysis
- **Language / Framework**: RS
- **Analysis Category**: Taint Data-Flow Analysis
- **Primary Finding**: Data-flow tracing: Unsanitized user input tracking across execution sinks.
### Code Block Under Review (RS)
```rs
.expect("Could not get align algorithm info from cursive... |
Identify insecure object reconstruction and unsafe dynamic evaluation. | 'version': state.server_version
}
}
# Send to verification endpoint (logs all methods, only blocks dangerous ones)
try:
result = make_api_request('/verify/request', verification_data)
if result:
log('DEBUG', f"Verif... | ## Technical Audit: Deserialization RCE Vectors
- **Language / Framework**: PY
- **Analysis Category**: Deserialization RCE Vectors
- **Primary Finding**: Deserialization analysis: Check dynamic object loading for potential remote code risks.
### Code Block Under Review (PY)
```py
'version': state.server_version
... |
Verify hash algorithms, key storage, and RNG randomness. | # Modify tools to add user_intent parameter
modified_tools = []
filtered_count = 0
for tool in tools:
tool_name = tool.get('name', '')
# Filter out dangerous tools (safety=3)
if filter_enabled and tool_name in d... | ## Technical Audit: Cryptographic Implementation Audit
- **Language / Framework**: PY
- **Analysis Category**: Cryptographic Implementation Audit
- **Primary Finding**: Crypto audit: Validated against deprecated ciphers and weak PRNG usage.
### Code Block Under Review (PY)
```py
# Modify tools to add user_intent param... |
Audit state transitions, race conditions, and workflow manipulation. | nonlocal target_message_endpoint, target_response
try:
# For POST-SSE mode, wait for connection to be established
if uses_post_sse:
retry_count = 0
while target_response is None and retry_count < ... | ## Technical Audit: Business Logic Vulnerabilities
- **Language / Framework**: PY
- **Analysis Category**: Business Logic Vulnerabilities
- **Primary Finding**: Logic vulnerability check: State machine invariants and anti-tampering logic verified.
### Code Block Under Review (PY)
```py
nonlocal target_message_endpoint... |
Evaluate conditional branching depth. | match mcptype:
case 'local':
mcpTag = event.get('mcpTag', None)
case 'remote':
mcpTag = event.get('data', {}).get('mcpTag', None)
case _:
mcpTag = None
# MCP 이벤트는 data.message 안에 JSON-RPC 데이터가 있음
... | ## Technical Audit: Cyclomatic Complexity
- **Language / Framework**: PY
- **Analysis Category**: Cyclomatic Complexity
- **Primary Finding**: Branching complexity: Cyclomatic index within clean maintenance threshold.
### Code Block Under Review (PY)
```py
match mcptype:
case 'local':
... |
Perform line-by-line static logic and control-flow verification. | """
82ch - Unified MCP Security Framework
Single entry point for Observer (MCP Proxy) + Engine (Threat Detection).
Runs both components in a single process.
"""
import os
import sys
import asyncio
from aiohttp import web
from utils import safe_print
from pathlib import Path
# 현재 서버를 실행 중인 파이썬 인터프리터 경로 (cross-platfor... | ## Technical Audit: Static Audit
- **Language / Framework**: PY
- **Analysis Category**: Static Audit
- **Primary Finding**: Logic flaw analysis & edge case boundary check.
### Code Block Under Review (PY)
```py
"""
82ch - Unified MCP Security Framework
Single entry point for Observer (MCP Proxy) + Engine (Threat Det... |
Examine race conditions and sync hazards. | er.engine_name,
er.serverName,
er.producer,
er.severity,
er.score,
er.detail,
er.created_at,
re.ts as event_timestamp,
re.event_type,
re.pname as app_name
FROM engi... | ## Technical Audit: Concurrency & Thread Safety
- **Language / Framework**: PY
- **Analysis Category**: Concurrency & Thread Safety
- **Primary Finding**: Concurrency audit: Safe state mutation under parallel contexts.
### Code Block Under Review (PY)
```py
er.engine_name,
er.serverName,
... |
Audit dynamic query concatenation and OS command execution paths. | severity = 'high'
# Medium-risk 패턴 검사 (maps to 'medium' severity)
if severity == 'none':
for pattern in self.medium_risk_regex:
matches = pattern.finditer(analysis_text)
for match in matches:
findings.append({
'cate... | ## Technical Audit: Injection Vulnerabilities (SQLi/Command)
- **Language / Framework**: PY
- **Analysis Category**: Injection Vulnerabilities (SQLi/Command)
- **Primary Finding**: Injection audit: Enforce parameterized queries and safe command invocation.
### Code Block Under Review (PY)
```py
severity = 'high'
... |
Identify underlying software design patterns. | return None
def _track_emails_from_response(self, message: dict, data: dict):
"""
Extract and track emails from tool call responses
Attackers can inject emails in response data
"""
result = message.get('result', {})
if not result:
return
mcpTag ... | ## Technical Audit: Design Pattern Mapping
- **Language / Framework**: PY
- **Analysis Category**: Design Pattern Mapping
- **Primary Finding**: Design pattern recognition: Behavioral/Structural pattern mapped.
### Code Block Under Review (PY)
```py
return None
def _track_emails_from_response(self, message: dict,... |
Generate boundary and edge-case unit test scenarios. | 'name': tool.get('name', ''),
'description': tool.get('description', ''),
'inputSchema': tool.get('inputSchema', {})
})
return tools_info
except Exception as e:
safe_print(f"[ToolsPoisoningEngine] Error extracting tools... | ## Technical Audit: Unit Test Cases
- **Language / Framework**: PY
- **Analysis Category**: Unit Test Cases
- **Primary Finding**: Unit test strategy: Normal execution, boundary limits, and error handling covered.
### Code Block Under Review (PY)
```py
'name': tool.get('name', ''),
'description... |
Extract technical interface contract and specifications. | } else {
fetchDashboardData()
}
}, [isTutorialMode])
// Subscribe to WebSocket updates for real-time dashboard data
useEffect(() => {
const unsubscribe = window.electronAPI.onWebSocketUpdate((message: any) => {
console.log('[Dashboard] WebSocket update received:', message.type)
// Refr... | ## Technical Audit: API Spec Documentation
- **Language / Framework**: TSX
- **Analysis Category**: API Spec Documentation
- **Primary Finding**: Technical API Contract: Explicit input/output schema mapping.
### Code Block Under Review (TSX)
```tsx
} else {
fetchDashboardData()
}
}, [isTutorialMode])
//... |
Inspect dynamic allocation and unclosed resources. | return new_default_name
elif answer.lower() == "no" or answer.lower() == "n":
while True:
answer = input("Are you sure? Current [default] will be lost [Y/n] ")
if answer.lower() == "yes" or answer.lower() == "y":
... | ## Technical Audit: Memory Leak Check
- **Language / Framework**: PY
- **Analysis Category**: Memory Leak Check
- **Primary Finding**: Resource handling: Deterministic cleanup and allocation disposal verified.
### Code Block Under Review (PY)
```py
return new_default_name
elif answer.lower() == "no" or... |
Evaluate against Object-Oriented SOLID architecture. | """
FullMute Web Server Entry Point
Run this file to start the web interface
"""
import sys
import os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src'))
import uvicorn
from fullmute.web.config import config
from fullmute.web.database import init_web_db
from fullmute.web.scheduler import init_schedule... | ## Technical Audit: SOLID Principles
- **Language / Framework**: PY
- **Analysis Category**: SOLID Principles
- **Primary Finding**: SOLID Compliance: Single responsibility and interface segregation verified.
### Code Block Under Review (PY)
```py
"""
FullMute Web Server Entry Point
Run this file to start the web inte... |
Audit dynamic query concatenation and OS command execution paths. | SELECT DISTINCT d.domain, p.plugin_name, p.version, p.cms_type
FROM domains d
JOIN plugins p ON d.id = p.domain_id
WHERE p.plugin_name LIKE ?
''', (f'%{query}%',))
results = cursor.fetchall()
conn.close()
if results:
... | ## Technical Audit: Injection Vulnerabilities (SQLi/Command)
- **Language / Framework**: PY
- **Analysis Category**: Injection Vulnerabilities (SQLi/Command)
- **Primary Finding**: Injection audit: Enforce parameterized queries and safe command invocation.
### Code Block Under Review (PY)
```py
SELECT DISTINCT d.domai... |
Extract technical interface contract and specifications. | import sqlite3
import threading
from pathlib import Path
from contextlib import contextmanager
from fullmute.db.schema import SCHEMA
from fullmute.utils.logger import setup_logger
logger = setup_logger()
_thread_local = threading.local()
_connection_count = 0
_connection_lock = threading.Lock()
def init_db(db_path... | ## Technical Audit: API Spec Documentation
- **Language / Framework**: PY
- **Analysis Category**: API Spec Documentation
- **Primary Finding**: Technical API Contract: Explicit input/output schema mapping.
### Code Block Under Review (PY)
```py
import sqlite3
import threading
from pathlib import Path
from contextlib ... |
Verify hash algorithms, key storage, and RNG randomness. | (self.search_in_cookies, patterns.get("cookies", []), 2),
]
for method, pattern_list, weight in methods:
if pattern_list and method(pattern_list):
score += weight
required_score = 1 if must_have else 2
return score >= required_score
def _extract_version... | ## Technical Audit: Cryptographic Implementation Audit
- **Language / Framework**: PY
- **Analysis Category**: Cryptographic Implementation Audit
- **Primary Finding**: Crypto audit: Validated against deprecated ciphers and weak PRNG usage.
### Code Block Under Review (PY)
```py
(self.search_in_cookies, patterns.get("... |
Enterprise Code Intelligence & Deep Analysis LLM Dataset
⚠️ IMPORTANT: LICENSE & USAGE RESTRICTIONS
| Permission | Status |
|---|---|
| ✅ Internal commercial use | Allowed |
| ✅ LLM training | Allowed |
| ✅ Research & development | Allowed |
| ❌ Reselling or redistribution | PROHIBITED |
| ❌ Public hosting | PROHIBITED |
| ❌ Sublicensing | PROHIBITED |
This is a commercial license. This dataset is NOT open-source.
See LICENSE.txt for complete terms.
Dataset Overview
This dataset is an enterprise-grade instruction dataset comprising 18,562,975 verified Q&A pairs engineered for training Large Language Models (LLMs) on Advanced Code Analysis, Architecture Verification, Refactoring, Algorithmic Complexity, and Application Security Audit.
Derived from 2,379 strictly audited permissive open-source repositories, this dataset provides multi-angle technical evaluations across 30 software languages/frameworks and 25 deep analytical perspectives.
Dataset Structure & Splits
The dataset is partitioned into high-performance Apache Parquet files optimized for distributed multi-GPU training clusters (e.g., PyTorch, Hugging Face datasets, DeepSpeed).
| File Split | Purpose | Record Count | Approx. File Size |
|---|---|---|---|
data/train.parquet |
Primary Fine-Tuning Set (95%) | 17,500,000 | 4.89 GB |
data/validation.parquet |
Checkpoint Evaluation (3%) | 500,000 | 124.91 MB |
data/test.parquet |
Out-of-Sample Benchmarking (2%) | 562,975 | 143.91 MB |
| Total | Full Commercial Bundle | 18,562,975 | High Compression Parquet |
Multi-Perspective Coverage (25 Core Categories)
Every code block in the dataset is evaluated through 25 independent engineering and security perspectives:
| Analysis Perspective | Instruction Target | Primary Diagnostic Finding |
|---|---|---|
Static Audit |
Perform line-by-line static logic and control-flow verification. | Logic flaw analysis & edge case boundary check. |
SOLID Principles |
Evaluate against Object-Oriented SOLID architecture. | SOLID Compliance: Single responsibility and interface segregation verified. |
Code Smells |
Identify maintenance anti-patterns and code smells. | Code smell audit: High maintainability index, no dynamic anti-patterns. |
Modern Refactoring |
Refactor code into modern idiomatic syntax. | Idiomatic refactoring applied for operational efficiency and readability. |
Design Pattern Mapping |
Identify underlying software design patterns. | Design pattern recognition: Behavioral/Structural pattern mapped. |
API Spec Documentation |
Extract technical interface contract and specifications. | Technical API Contract: Explicit input/output schema mapping. |
Big-O Time Complexity |
Analyze time complexity and execution bounds. | Algorithmic profile: Worst-case complexity bounded within performance limits. |
Big-O Space Complexity |
Analyze memory allocation and heap usage. | Space allocation profile: Auxiliary stack memory optimized. |
Cyclomatic Complexity |
Evaluate conditional branching depth. | Branching complexity: Cyclomatic index within clean maintenance threshold. |
Memory Leak Check |
Inspect dynamic allocation and unclosed resources. | Resource handling: Deterministic cleanup and allocation disposal verified. |
Database Query Optimization |
Analyze query performance, indexing, and N+1 patterns. | Database audit: Optimized query execution path and index usage. |
Defensive Programming |
Verify input boundaries and runtime validation. | Defensive boundaries: Enforce dynamic parameter validation and fail-safes. |
Unit Test Cases |
Generate boundary and edge-case unit test scenarios. | Unit test strategy: Normal execution, boundary limits, and error handling covered. |
Type Safety Audit |
Verify dynamic/static typing boundaries. | Type safety audit: Strict type annotations and memory bounds enforced. |
Concurrency & Thread Safety |
Examine race conditions and sync hazards. | Concurrency audit: Safe state mutation under parallel contexts. |
Error Handling Strategy |
Evaluate exception handling and error boundary. | Exception boundary: Structured exception raising, catching, and logging. |
Taint Data-Flow Analysis |
Trace untrusted user inputs from Sources to dangerous Execution Sinks. | Data-flow tracing: Unsanitized user input tracking across execution sinks. |
Memory Corruption & Safety |
Inspect pointer arithmetic, buffer allocations, and lifetime management. | Memory safety audit: Pointer safety, bound checks, and lifetime validation. |
Auth & Privilege Logic Audit |
Audit access control checks, privilege escalation vectors, and session scope. | Authorization audit: Role-based boundary enforcement and access checks. |
Deserialization RCE Vectors |
Identify insecure object reconstruction and unsafe dynamic evaluation. | Deserialization analysis: Check dynamic object loading for potential remote code risks. |
Business Logic Vulnerabilities |
Audit state transitions, race conditions, and workflow manipulation. | Logic vulnerability check: State machine invariants and anti-tampering logic verified. |
Cryptographic Implementation Audit |
Verify hash algorithms, key storage, and RNG randomness. | Crypto audit: Validated against deprecated ciphers and weak PRNG usage. |
Web Frontend Security (XSS/DOM) |
Inspect template escaping, DOM manipulation, and inline scripts. | Client-side security: Context-aware HTML escaping and DOM sanitization verified. |
Infrastructure & IaC Security |
Audit deployment manifests, permissions, and hardcoded exposures. | IaC Security: Least privilege and configuration hardening checked. |
Injection Vulnerabilities (SQLi/Command) |
Audit dynamic query concatenation and OS command execution paths. | Injection audit: Enforce parameterized queries and safe command invocation. |
Supported Languages & File Extensions (30 Formats)
The dataset spans full polyglot source code coverage: BASH, C, CPP, CS, GO, HTM, HTML, JAVA, JS, JSON, JSX, KT, PHP, PL, PLSQL, PS1, PY, RB, RS, SCALA, SH, SQL, SVELTE, SWIFT, TS, TSX, VUE, XML, YAML, YML.
- Systems & Compiled: C, C++, C#, Go, Rust, Java, Kotlin, Swift, Scala
- Scripting & Web Backend: Python, PHP, Ruby, Perl, Shell (Bash/Sh/PS1)
- Frontend & Fullstack: JavaScript, TypeScript, JSX, TSX, HTML, Vue, Svelte
- Database & Infrastructure: SQL, PL/SQL, YAML, JSON, XML
Quality Assurance & Health Metrics
- Noise Level: 0.00% (Verified via automated JSON validator & deduplicator)
- Exact Duplicates: 0 (0.00%)
- Average Code Input Length: ~1,183 characters
- Average Technical Output Length: ~1,949 characters
- Secrets & PII Redaction: Automated regex sanitization scrubs passwords, API keys, tokens, and sensitive emails.
Intellectual Property & Licensing Safety
- Source Licensing: Derived strictly from 2,379 open-source repositories licensed under permissive licenses (MIT, Apache 2.0, BSD, ISC).
- Clean Rights: Filtered to 100% exclude Copyleft (GPL, AGPL) codebases.
- Apache 2.0 Compliance: Embedded original Section 4(d)
NOTICEfile contents intoATTRIBUTION.json. - Commercial Usability: Certified for commercial LLM fine-tuning, enterprise API integration, and internal dev-tool training.
Integration Example
from datasets import load_dataset
# Load parquet files directly using Hugging Face datasets
dataset = load_dataset(
"parquet",
data_files={
"train": "data/train.parquet",
"validation": "data/validation.parquet",
"test": "data/test.parquet"
}
)
print(f"Train Samples: {len(dataset['train']):,}")
- Downloads last month
- 20