Skip to content

Commit

Permalink
Lower severity of Block.Timestamp Deadline detector (#767)
Browse files Browse the repository at this point in the history
  • Loading branch information
TilakMaddy authored Oct 18, 2024
1 parent 6aae4b4 commit 7331fe2
Show file tree
Hide file tree
Showing 8 changed files with 599 additions and 603 deletions.
2 changes: 0 additions & 2 deletions aderyn_core/src/detect/high/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
pub(crate) mod arbitrary_transfer_from;
pub(crate) mod avoid_abi_encode_packed;
pub(crate) mod block_timestamp_deadline;
pub(crate) mod const_func_change_state;
pub(crate) mod contract_locks_ether;
pub(crate) mod dangerous_strict_equality_balance;
Expand Down Expand Up @@ -42,7 +41,6 @@ pub(crate) mod yul_return;

pub use arbitrary_transfer_from::ArbitraryTransferFromDetector;
pub use avoid_abi_encode_packed::AvoidAbiEncodePackedDetector;
pub use block_timestamp_deadline::BlockTimestampDeadlineDetector;
pub use const_func_change_state::ConstantFunctionChangingStateDetector;
pub use contract_locks_ether::ContractLocksEtherDetector;
pub use dangerous_strict_equality_balance::DangerousStrictEqualityOnBalanceDetector;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl IssueDetector for BlockTimestampDeadlineDetector {
}

fn severity(&self) -> IssueSeverity {
IssueSeverity::High
IssueSeverity::Low
}

fn title(&self) -> String {
Expand All @@ -121,7 +121,7 @@ impl IssueDetector for BlockTimestampDeadlineDetector {
mod block_timestamp_deadline_detector_tests {
use serial_test::serial;

use crate::detect::{detector::IssueDetector, high::BlockTimestampDeadlineDetector};
use crate::detect::{detector::IssueDetector, low::BlockTimestampDeadlineDetector};

#[test]
#[serial]
Expand All @@ -137,7 +137,7 @@ mod block_timestamp_deadline_detector_tests {
// assert that the number of instances found is correct
assert_eq!(detector.instances().len(), 9);
// assert that the severity is High
assert_eq!(detector.severity(), crate::detect::detector::IssueSeverity::High);
assert_eq!(detector.severity(), crate::detect::detector::IssueSeverity::Low);
// assert that the title is correct
assert_eq!(
detector.title(),
Expand Down Expand Up @@ -167,7 +167,7 @@ mod block_timestamp_deadline_detector_tests {
// assert that the number of instances found is correct
assert_eq!(detector.instances().len(), 8);
// assert that the severity is High
assert_eq!(detector.severity(), crate::detect::detector::IssueSeverity::High);
assert_eq!(detector.severity(), crate::detect::detector::IssueSeverity::Low);
// assert that the title is correct
assert_eq!(
detector.title(),
Expand Down
2 changes: 2 additions & 0 deletions aderyn_core/src/detect/low/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pub(crate) mod assert_state_change;
pub(crate) mod block_timestamp_deadline;
pub(crate) mod boolean_equality;
pub(crate) mod builtin_symbol_shadowing;
pub(crate) mod cache_array_length;
Expand Down Expand Up @@ -46,6 +47,7 @@ pub(crate) mod void_constructor;
pub(crate) mod zero_address_check;

pub use assert_state_change::AssertStateChangeDetector;
pub use block_timestamp_deadline::BlockTimestampDeadlineDetector;
pub use boolean_equality::BooleanEqualityDetector;
pub use builtin_symbol_shadowing::BuiltinSymbolShadowDetector;
pub use cache_array_length::CacheArrayLengthDetector;
Expand Down
1 change: 0 additions & 1 deletion reports/adhoc-sol-files-highs-only-report.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

222 changes: 111 additions & 111 deletions reports/report.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7331fe2

Please sign in to comment.