Repository Analysis

OpenZeppelin/openzeppelin-contracts

OpenZeppelin Contracts is a library for secure smart contract development.

5.6 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of OpenZeppelin/openzeppelin-contracts, a Solidity project with 27,234 GitHub stars. SynthScan v2.0 examined 67,873 lines of code across 393 source files, recording 72 pattern matches distributed across 8 syntactic categories. The overall adjusted score of 5.6 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

5.6
Adjusted Score
5.6
Raw Score
100%
Time Factor
2026-08-28
Last Push
27.2K
Stars
Solidity
Language
67.9K
Lines of Code
393
Files
72
Pattern Hits
2026-08-29
Scan Date
0.07
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 27HIGH 1MEDIUM 4LOW 40

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 72 distinct pattern matches across 8 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hallucination Indicators27 hits · 310 pts
SeverityFileLineSnippetContext
CRITICALtest/account/extensions/ERC7821.behavior.js53 await expect(this.ethers.predeploy.entrypoint.v09.getNonce(this.mock.target, 0)).to.eventually.equal(0);CODE
CRITICALtest/account/extensions/ERC7821.behavior.js54 await expect(this.ethers.predeploy.entrypoint.v09.handleOps([operation.packed], this.beneficiary))CODE
CRITICALtest/account/extensions/ERC7821.behavior.js75 await expect(this.ethers.predeploy.entrypoint.v09.handleOps([operation.packed], this.beneficiary)).to.revert(CODE
CRITICALtest/account/extensions/ERC7821.behavior.js99 await expect(this.ethers.predeploy.entrypoint.v09.handleOps([operation.packed], this.beneficiary))CODE
CRITICALtest/account/extensions/ERC7821.behavior.js112 this.ethers.predeploy.entrypoint.v09.handleOps([operation.packed], this.beneficiary),CODE
CRITICALtest/account/extensions/ERC7821.behavior.js135 const tx = this.ethers.predeploy.entrypoint.v09.handleOps([operation.packed], this.beneficiary);CODE
CRITICALtest/account/paymaster/PaymasterERC20.test.js272 const postOpError = ethers.predeploy.entrypoint.v09.interface.parseError(postOpRevertReason);CODE
CRITICALtest/account/paymaster/Paymaster.behavior.js45 await expect(this.ethers.predeploy.entrypoint.v09.getNonce(this.account, 0n)).to.eventually.equal(0n);CODE
CRITICALtest/account/paymaster/Paymaster.behavior.js46 await expect(this.ethers.predeploy.entrypoint.v09.balanceOf(this.paymaster)).to.eventually.equal(deposit);CODE
CRITICALtest/account/paymaster/Paymaster.behavior.js49 const handleOpsTx = this.ethers.predeploy.entrypoint.v09.handleOps([signedUserOp.packed], this.receiver);CODE
CRITICALtest/account/paymaster/Paymaster.behavior.js57 await expect(this.ethers.predeploy.entrypoint.v09.getNonce(this.account, 0n)).to.eventually.equal(1n);CODE
CRITICALtest/account/paymaster/Paymaster.behavior.js58 await expect(this.ethers.predeploy.entrypoint.v09.balanceOf(this.paymaster)).to.eventually.be.lessThan(deposit);CODE
CRITICALtest/account/paymaster/Paymaster.behavior.js76 await expect(this.ethers.predeploy.entrypoint.v09.handleOps([signedUserOp.packed], this.receiver))CODE
CRITICALtest/account/paymaster/Paymaster.behavior.js105 await expect(this.ethers.predeploy.entrypoint.v09.handleOps([signedUserOp.packed], this.receiver))CODE
CRITICALtest/account/paymaster/Paymaster.behavior.js125 await expect(this.ethers.predeploy.entrypoint.v09.handleOps([signedUserOp.packed], this.receiver))CODE
CRITICALtest/account/paymaster/Paymaster.behavior.js152 await expect(this.ethers.predeploy.entrypoint.v09.balanceOf(this.paymaster)).to.eventually.equal(0n);CODE
CRITICALtest/account/paymaster/Paymaster.behavior.js160 await expect(this.ethers.predeploy.entrypoint.v09.balanceOf(this.paymaster)).to.eventually.equal(value);CODE
CRITICALtest/account/paymaster/Paymaster.behavior.js168 await expect(this.ethers.predeploy.entrypoint.v09.balanceOf(this.paymaster)).to.eventually.equal(value - 1n);CODE
CRITICALtest/account/paymaster/Paymaster.behavior.js180 await expect(this.ethers.predeploy.entrypoint.v09.getDepositInfo(this.paymaster)).to.eventually.deep.equal([CODE
CRITICALtest/account/paymaster/Paymaster.behavior.js195 await expect(this.ethers.predeploy.entrypoint.v09.getDepositInfo(this.paymaster)).to.eventually.deep.equal([CODE
CRITICALtest/account/paymaster/Paymaster.behavior.js207 await expect(this.ethers.predeploy.entrypoint.v09.getDepositInfo(this.paymaster)).to.eventually.deep.equal([CODE
CRITICALtest/account/paymaster/Paymaster.behavior.js224 await expect(this.ethers.predeploy.entrypoint.v09.getDepositInfo(this.paymaster)).to.eventually.deep.equal([CODE
CRITICALtest/helpers/governance.js170 return this.connection.helpers.time.increaseTo.timestamp(timestamp + offset);CODE
CRITICALhardhat/hardhat-transpiler/tasks/transpile.ts57 const mainSources = hre.config.paths.sources.solidity.at(0)!;CODE
CRITICALhardhat/hardhat-exposed/tasks/build.ts22 if (!hre.config.paths.sources.solidity.includes(hre.config.exposed.outDir)) {CODE
CRITICALhardhat/hardhat-exposed/tasks/build.ts23 hre.config.paths.sources.solidity.push(hre.config.exposed.outDir);CODE
CRITICAL…hat/hardhat-oz-contracts-helpers/hook-handlers/test.ts21 const hasProxies = fs.existsSync(path.join(context.config.paths.sources.solidity.at(0)!, 'proxy/Proxy.sol'));CODE
Hyper-Verbose Identifiers24 hits · 24 pts
SeverityFileLineSnippetContext
LOWtest/token/ERC1155/ERC1155.behavior.js516 function batchTransferWasSuccessful() {CODE
LOW…y/transparent/TransparentUpgradeableProxy.behaviour.js6export function shouldBehaveLikeTransparentUpgradeableProxy() {CODE
LOWtest/access/AccessControl.behavior.js11export function shouldBehaveLikeAccessControl() {CODE
LOWtest/access/AccessControl.behavior.js226export function shouldBehaveLikeAccessControlEnumerable() {CODE
LOWtest/access/AccessControl.behavior.js263export function shouldBehaveLikeAccessControlDefaultAdminRules() {CODE
LOWtest/access/manager/AccessManager.predicate.js168export function testAsSchedulableOperation({ scheduled: { before, after, expired }, notScheduled }) {CODE
LOWtest/access/manager/AccessManager.predicate.js230export function testAsRestrictedOperation({ callerIsTheManager: { executing, notExecuting }, callerIsNotTheManager }) {CODE
LOWtest/access/manager/AccessManager.behavior.js18export function shouldBehaveLikeDelayedAdminOperation() {CODE
LOWtest/access/manager/AccessManager.behavior.js57export function shouldBehaveLikeNotDelayedAdminOperation() {CODE
LOWtest/access/manager/AccessManager.behavior.js96export function shouldBehaveLikeRoleAdminOperation(roleAdmin) {CODE
LOWtest/access/manager/AccessManager.behavior.js136export function shouldBehaveLikeAManagedRestrictedOperation() {CODE
LOWtest/access/manager/AccessManager.behavior.js193export function shouldBehaveLikeASelfRestrictedOperation() {CODE
LOWtest/utils/Context.behavior.js3export async function shouldBehaveLikeRegularContext() {CODE
LOWtest/utils/Nonces.behavior.js69export function shouldBehaveLikeNoncesKeyed() {CODE
LOWtest/account/Account.behavior.js6export function shouldBehaveLikeAccountCore() {CODE
LOWtest/account/Account.behavior.js83export function shouldBehaveLikeAccountHolder() {CODE
LOWtest/account/paymaster/Paymaster.behavior.js12export function shouldBehaveLikePaymaster({ postOp, timeRange }) {CODE
LOW…dhat/hardhat-solidity-docgen/internal/utils/natspec.ts141function cleanUpDocstringFromSource(text: string) {CODE
LOWhardhat/hardhat-exposed/internal/expose.ts52function getImportPathFromExposedContract(CODE
LOWhardhat/hardhat-exposed/internal/expose.ts300function areFunctionsFullyImplemented(contract: ContractDefinition, deref: ASTDereferencer): boolean {CODE
LOWhardhat/hardhat-exposed/internal/expose.ts319function getFunctionNameQualifiedFromArgs(fn: FunctionDefinition, args: Argument[], onlyConflicting: boolean): string {CODE
LOWhardhat/hardhat-exposed/internal/expose.ts513function getAllStorageArgumentsFromCache(CODE
LOWhardhat/hardhat-exposed/internal/expose.ts523function getFunctionReturnParameters(CODE
LOWhardhat/hardhat-exposed/internal/build-info.ts3export async function compilationJobToAstOnlyBuildInfo(compilationJob: CompilationJob): Promise<SolidityBuildInfo> {CODE
Decorative Section Separators4 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUM.github/workflows/release-cycle.yml4# ┌───────────┐ ┌─────────────┐ ┌────────────────┐COMMENT
MEDIUM.github/workflows/release-cycle.yml6# └───────────┘ └─┬─────────▲─┘ │ └─┬────────────▲─┘COMMENT
MEDIUM.github/workflows/release-cycle.yml10# ┌▼─────────┴┐ │ ┌▼────────────┴┐COMMENT
MEDIUM.github/workflows/release-cycle.yml12# └───────────┘ └──────────────┘COMMENT
Fake / Example Data6 hits · 6 pts
SeverityFileLineSnippetContext
LOWtest/utils/RLP.test.js214 'Lorem ipsum dolor sit amet, consectetur adipisicing elit',CODE
LOWtest/utils/RLP.test.js214 'Lorem ipsum dolor sit amet, consectetur adipisicing elit',CODE
LOWtest/utils/Bytes.test.js23 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aCODE
LOWtest/utils/Bytes.test.js23 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aCODE
LOWtest/utils/SlotDerivation.test.js50 { type: 'string', key: 'lorem ipsum', isValueType: false },CODE
LOWtest/utils/StorageSlot.test.js20 { name: 'String', type: 'string', value: 'lorem ipsum', isValueType: false, zero: '' },CODE
Verbosity Indicators3 hits · 6 pts
SeverityFileLineSnippetContext
LOWtest/utils/cryptography/ERC1271.behavior.js102 // Step 1: a malicious actor manages to get the user to sign a message that is not the one the app expects, buCOMMENT
LOWtest/utils/cryptography/ERC1271.behavior.js111 // Step 2: the malicious actor uses the signature with a contentsHash of its choosing.COMMENT
LOWtest/utils/cryptography/ERC1271.behavior.js127 // Step 3: the malicious actor submits the signature to the verifier, which must reject it.COMMENT
Structural Annotation Overuse3 hits · 6 pts
SeverityFileLineSnippetContext
LOWtest/utils/cryptography/ERC1271.behavior.js102 // Step 1: a malicious actor manages to get the user to sign a message that is not the one the app expects, buCOMMENT
LOWtest/utils/cryptography/ERC1271.behavior.js111 // Step 2: the malicious actor uses the signature with a contentsHash of its choosing.COMMENT
LOWtest/utils/cryptography/ERC1271.behavior.js127 // Step 3: the malicious actor submits the signature to the verifier, which must reject it.COMMENT
Cross-Language Confusion (JS/TS)1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHscripts/gen-nav.js76print(CODE
Over-Commented Block4 hits · 4 pts
SeverityFileLineSnippetContext
LOWtest/access/manager/AccessManager.test.js81 user,COMMENT
LOWtest/utils/cryptography/ERC1271.behavior.js101 it('returns false for a malformed contents descriptor', async function () {COMMENT
LOWtest/account/paymaster/PaymasterERC20Guarantor.test.js41 const paymasterDomain = await getDomain(paymaster);COMMENT
LOW.github/workflows/release-cycle.yml1# D: Manual DispatchCOMMENT