diff --git a/aderyn_core/src/detect/detector.rs b/aderyn_core/src/detect/detector.rs index 9002caec..40d79390 100644 --- a/aderyn_core/src/detect/detector.rs +++ b/aderyn_core/src/detect/detector.rs @@ -114,7 +114,7 @@ pub fn get_all_detectors_names() -> Vec { #[derive(Debug, PartialEq, EnumString, Display)] #[strum(serialize_all = "kebab-case")] pub(crate) enum IssueDetectorNamePool { - StateVariableCouldBeDeclaredImmutable, + StateVariableCouldBeImmutable, MultiplePlaceholders, StateVariableChangesWithoutEvents, MissingInheritance, @@ -135,7 +135,7 @@ pub(crate) enum IssueDetectorNamePool { CentralizationRisk, SolmateSafeTransferLib, HashCollisionDueToAbiEncodePacked, - SignatureMalleabilityDueToRawEcrecover, + RawEcrecover, DeprecatedOzFunctions, UnsafeERC20Functions, UnspecificSolidityPragma, @@ -183,7 +183,7 @@ pub(crate) enum IssueDetectorNamePool { UncheckedReturn, DangerousUnaryOperator, TautologyOrContradiction, - DangerousStrictEquailtyOnContractBalance, + StrictEquailtyCheckOnContractBalance, SignedStorageArray, RedundantStatements, PublicVariableReadInExternalContext, @@ -201,7 +201,7 @@ pub(crate) enum IssueDetectorNamePool { UninitializedLocalVariable, ReturnBomb, OutOfOrderRetryable, - StateVariableCouldBeDeclaredConstant, + StateVariableCouldBeConstant, // NOTE: `Undecided` will be the default name (for new bots). // If it's accepted, a new variant will be added to this enum before normalizing it in aderyn Undecided, @@ -211,7 +211,7 @@ pub fn request_issue_detector_by_name(detector_name: &str) -> Option { + IssueDetectorNamePool::StateVariableCouldBeImmutable => { Some(Box::::default()) } IssueDetectorNamePool::MultiplePlaceholders => { @@ -228,7 +228,7 @@ pub fn request_issue_detector_by_name(detector_name: &str) -> Option Some(Box::::default()), IssueDetectorNamePool::VoidConstructor => Some(Box::::default()), - IssueDetectorNamePool::StateVariableCouldBeDeclaredConstant => { + IssueDetectorNamePool::StateVariableCouldBeConstant => { Some(Box::::default()) } IssueDetectorNamePool::LiteralInsteadOfConstant => { @@ -287,9 +287,7 @@ pub fn request_issue_detector_by_name(detector_name: &str) -> Option { Some(Box::::default()) } - IssueDetectorNamePool::SignatureMalleabilityDueToRawEcrecover => { - Some(Box::::default()) - } + IssueDetectorNamePool::RawEcrecover => Some(Box::::default()), IssueDetectorNamePool::DeprecatedOzFunctions => { Some(Box::::default()) } @@ -406,7 +404,7 @@ pub fn request_issue_detector_by_name(detector_name: &str) -> Option { Some(Box::::default()) } - IssueDetectorNamePool::DangerousStrictEquailtyOnContractBalance => { + IssueDetectorNamePool::StrictEquailtyCheckOnContractBalance => { Some(Box::::default()) } IssueDetectorNamePool::SignedStorageArray => { diff --git a/aderyn_core/src/detect/high/dangerous_strict_equality_balance.rs b/aderyn_core/src/detect/high/dangerous_strict_equality_balance.rs index 30579c59..9cb1cdbe 100644 --- a/aderyn_core/src/detect/high/dangerous_strict_equality_balance.rs +++ b/aderyn_core/src/detect/high/dangerous_strict_equality_balance.rs @@ -73,7 +73,7 @@ impl IssueDetector for DangerousStrictEqualityOnBalanceDetector { } fn name(&self) -> String { - IssueDetectorNamePool::DangerousStrictEquailtyOnContractBalance.to_string() + IssueDetectorNamePool::StrictEquailtyCheckOnContractBalance.to_string() } } diff --git a/aderyn_core/src/detect/low/ecrecover.rs b/aderyn_core/src/detect/low/ecrecover.rs index 47654c4d..b0503400 100644 --- a/aderyn_core/src/detect/low/ecrecover.rs +++ b/aderyn_core/src/detect/low/ecrecover.rs @@ -49,7 +49,7 @@ impl IssueDetector for EcrecoverDetector { } fn name(&self) -> String { - format!("{}", IssueDetectorNamePool::SignatureMalleabilityDueToRawEcrecover) + format!("{}", IssueDetectorNamePool::RawEcrecover) } } diff --git a/aderyn_core/src/detect/low/state_variable_could_be_constant.rs b/aderyn_core/src/detect/low/state_variable_could_be_constant.rs index c9403f2a..dba18ccd 100644 --- a/aderyn_core/src/detect/low/state_variable_could_be_constant.rs +++ b/aderyn_core/src/detect/low/state_variable_could_be_constant.rs @@ -106,7 +106,7 @@ impl IssueDetector for StateVariableCouldBeConstantDetector { } fn name(&self) -> String { - format!("{}", IssueDetectorNamePool::StateVariableCouldBeDeclaredConstant) + format!("{}", IssueDetectorNamePool::StateVariableCouldBeConstant) } } diff --git a/aderyn_core/src/detect/low/state_variable_could_be_immutable.rs b/aderyn_core/src/detect/low/state_variable_could_be_immutable.rs index 563b9e80..92053837 100644 --- a/aderyn_core/src/detect/low/state_variable_could_be_immutable.rs +++ b/aderyn_core/src/detect/low/state_variable_could_be_immutable.rs @@ -148,7 +148,7 @@ impl IssueDetector for StateVariableCouldBeImmutableDetector { } fn name(&self) -> String { - format!("{}", IssueDetectorNamePool::StateVariableCouldBeDeclaredImmutable) + format!("{}", IssueDetectorNamePool::StateVariableCouldBeImmutable) } } diff --git a/reports/adhoc-sol-files-highs-only-report.json b/reports/adhoc-sol-files-highs-only-report.json index 8a953244..b9c9e004 100644 --- a/reports/adhoc-sol-files-highs-only-report.json +++ b/reports/adhoc-sol-files-highs-only-report.json @@ -203,7 +203,7 @@ "unchecked-return", "dangerous-unary-operator", "tautology-or-contradiction", - "dangerous-strict-equailty-on-contract-balance", + "strict-equailty-check-on-contract-balance", "signed-storage-array", "weak-randomness", "pre-declared-local-variable-usage", diff --git a/reports/report.json b/reports/report.json index 938507ca..ffb67e4f 100644 --- a/reports/report.json +++ b/reports/report.json @@ -2100,7 +2100,7 @@ { "title": "Dangerous strict equality checks on contract balances.", "description": "A contract's balance can be forcibly manipulated by another selfdestructing contract. Therefore, it's recommended to use >, <, >= or <= instead of strict equality.", - "detector_name": "dangerous-strict-equailty-on-contract-balance", + "detector_name": "strict-equailty-check-on-contract-balance", "instances": [ { "contract_path": "src/DangerousStrictEquality1.sol", @@ -2710,7 +2710,7 @@ { "title": "`ecrecover` is susceptible to signature malleability", "description": "The `ecrecover` function is susceptible to signature malleability. This means that the same message can be signed in multiple ways, allowing an attacker to change the message signature without invalidating it. This can lead to unexpected behavior in smart contracts, such as the loss of funds or the ability to bypass access control. Consider using OpenZeppelin's ECDSA library instead of the built-in function.", - "detector_name": "signature-malleability-due-to-raw-ecrecover", + "detector_name": "raw-ecrecover", "instances": [ { "contract_path": "src/inheritance/ExtendedInheritance.sol", @@ -6274,7 +6274,7 @@ { "title": "State variable could be declared constant", "description": "State variables that are not updated following deployment should be declared constant to save gas. Add the `constant` attribute to state variables that never change.", - "detector_name": "state-variable-could-be-declared-constant", + "detector_name": "state-variable-could-be-constant", "instances": [ { "contract_path": "src/CostlyOperationsInsideLoops.sol", @@ -7158,7 +7158,7 @@ { "title": "State variable could be declared immutable", "description": "State variables that are should be declared immutable to save gas. Add the `immutable` attribute to state variables that are only changed in the constructor", - "detector_name": "state-variable-could-be-declared-immutable", + "detector_name": "state-variable-could-be-immutable", "instances": [ { "contract_path": "src/ArbitraryTransferFrom.sol", @@ -7368,7 +7368,7 @@ "centralization-risk", "solmate-safe-transfer-lib", "hash-collision-due-to-abi-encode-packed", - "signature-malleability-due-to-raw-ecrecover", + "raw-ecrecover", "deprecated-oz-functions", "unsafe-erc20-functions", "unspecific-solidity-pragma", @@ -7415,7 +7415,7 @@ "unchecked-return", "dangerous-unary-operator", "tautology-or-contradiction", - "dangerous-strict-equailty-on-contract-balance", + "strict-equailty-check-on-contract-balance", "signed-storage-array", "redundant-statements", "public-variable-read-in-external-context", @@ -7447,9 +7447,9 @@ "unused-import", "unchecked-low-level-call", "function-pointer-in-constructor", - "state-variable-could-be-declared-constant", + "state-variable-could-be-constant", "state-variable-changes-without-events", - "state-variable-could-be-declared-immutable", + "state-variable-could-be-immutable", "multiple-placeholders" ] } \ No newline at end of file diff --git a/reports/report.sarif b/reports/report.sarif index 824261d6..dba590fc 100644 --- a/reports/report.sarif +++ b/reports/report.sarif @@ -2936,7 +2936,7 @@ "message": { "text": "A contract's balance can be forcibly manipulated by another selfdestructing contract. Therefore, it's recommended to use >, <, >= or <= instead of strict equality." }, - "ruleId": "dangerous-strict-equailty-on-contract-balance" + "ruleId": "strict-equailty-check-on-contract-balance" }, { "level": "warning", @@ -3966,7 +3966,7 @@ "message": { "text": "The `ecrecover` function is susceptible to signature malleability. This means that the same message can be signed in multiple ways, allowing an attacker to change the message signature without invalidating it. This can lead to unexpected behavior in smart contracts, such as the loss of funds or the ability to bypass access control. Consider using OpenZeppelin's ECDSA library instead of the built-in function." }, - "ruleId": "signature-malleability-due-to-raw-ecrecover" + "ruleId": "raw-ecrecover" }, { "level": "note", @@ -10838,7 +10838,7 @@ "message": { "text": "State variables that are not updated following deployment should be declared constant to save gas. Add the `constant` attribute to state variables that never change." }, - "ruleId": "state-variable-could-be-declared-constant" + "ruleId": "state-variable-could-be-constant" }, { "level": "note", @@ -12297,7 +12297,7 @@ "message": { "text": "State variables that are should be declared immutable to save gas. Add the `immutable` attribute to state variables that are only changed in the constructor" }, - "ruleId": "state-variable-could-be-declared-immutable" + "ruleId": "state-variable-could-be-immutable" }, { "level": "note",