Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lower severity of Block.Timestamp Deadline detector #767

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading