From 4d063b849a8aa11e51fec8b6ef511f23ba180d41 Mon Sep 17 00:00:00 2001 From: TilakMaddy Date: Mon, 10 Mar 2025 18:26:22 +0530 Subject: [PATCH] fix --- aderyn_core/src/detect/detector.rs | 4 ++-- aderyn_core/src/detect/low/non_reentrant_before_others.rs | 2 +- reports/report.json | 4 ++-- reports/report.sarif | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/aderyn_core/src/detect/detector.rs b/aderyn_core/src/detect/detector.rs index 27ddfaf2d..5e438a9ae 100644 --- a/aderyn_core/src/detect/detector.rs +++ b/aderyn_core/src/detect/detector.rs @@ -142,7 +142,7 @@ pub(crate) enum IssueDetectorNamePool { UselessPublicFunction, UnindexedEvents, RequireWithoutString, - NonReentrantIsNotBeforeOthers, + NonReentrantNotFirstModifier, BlockTimestampIsWeakDeadline, LiteralInsteadOfConstant, UnsafeOzERC721Mint, @@ -305,7 +305,7 @@ pub fn request_issue_detector_by_name(detector_name: &str) -> Option { Some(Box::::default()) } - IssueDetectorNamePool::NonReentrantIsNotBeforeOthers => { + IssueDetectorNamePool::NonReentrantNotFirstModifier => { Some(Box::::default()) } IssueDetectorNamePool::BlockTimestampIsWeakDeadline => { diff --git a/aderyn_core/src/detect/low/non_reentrant_before_others.rs b/aderyn_core/src/detect/low/non_reentrant_before_others.rs index fb4c9b86c..ecca78935 100644 --- a/aderyn_core/src/detect/low/non_reentrant_before_others.rs +++ b/aderyn_core/src/detect/low/non_reentrant_before_others.rs @@ -48,7 +48,7 @@ impl IssueDetector for NonReentrantBeforeOthersDetector { } fn name(&self) -> String { - format!("{}", IssueDetectorNamePool::NonReentrantIsNotBeforeOthers) + format!("{}", IssueDetectorNamePool::NonReentrantNotFirstModifier) } } diff --git a/reports/report.json b/reports/report.json index a282ff3f9..5758d5094 100644 --- a/reports/report.json +++ b/reports/report.json @@ -3900,7 +3900,7 @@ { "title": "The `nonReentrant` `modifier` should occur before all other modifiers", "description": "This is a best-practice to protect against reentrancy in other modifiers.", - "detector_name": "non-reentrant-is-not-before-others", + "detector_name": "non-reentrant-not-first-modifier", "instances": [ { "contract_path": "src/AdminContract.sol", @@ -7156,7 +7156,7 @@ "literal-instead-of-constant", "unindexed-events", "require-without-string", - "non-reentrant-is-not-before-others", + "non-reentrant-not-first-modifier", "block-timestamp-is-weak-deadline", "unsafe-oz-erc721-mint", "push-zero-opcode", diff --git a/reports/report.sarif b/reports/report.sarif index 9a2c10cab..079fd047c 100644 --- a/reports/report.sarif +++ b/reports/report.sarif @@ -6121,7 +6121,7 @@ "message": { "text": "This is a best-practice to protect against reentrancy in other modifiers." }, - "ruleId": "non-reentrant-is-not-before-others" + "ruleId": "non-reentrant-not-first-modifier" }, { "level": "note",