Skip to content

Commit

Permalink
update messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Raz0r committed Aug 12, 2024
1 parent f83559e commit 75073c2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,12 @@ Rule ID | Description
--- | ---
solana-arbitrary-program-call | An attacker may be able to invoke arbitrary programs without address validations
solana-insecure-account-closing | Writing the CLOSED_ACCOUNT_DISCRIMINATOR to a closed account is crucial to prevent the reuse of the account within the same transaction

## Cairo Rules
Rule ID | Description
--- | ---
lack-of-error-message | Error message is missing in the assert statement
tx-origin-authentication | Using `account_contract_address` for authentication is insecure. Use `get_caller_address` or an appropriate method for verifying users.
view-fn-mutable-state | View function should not be able to modify state
view-fn-writes | View function should not write to the state
zero-division | Possible division by zero
4 changes: 2 additions & 2 deletions cairo/lack-of-error-message.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
rules:
- id: lack-of-error-message
- id: lack-of-error-message
languages: [cairo]
message: Add error message to assert
message: Error message is missing in the assert statement
severity: INFO
metadata:
category: best-practice
Expand Down
2 changes: 1 addition & 1 deletion cairo/tx-origin-authentication.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
rules:
- id: tx-origin-authentication
languages: [cairo]
message: "Using account_contract_address for authentication is insecure. Use get_caller_address or an appropriate method for verifying users."
message: Using `account_contract_address` for authentication is insecure. Use `get_caller_address` or an appropriate method for verifying users.
severity: MEDIUM
metadata:
category: security
Expand Down
2 changes: 1 addition & 1 deletion cairo/view-fn-writes.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
rules:
- id: view-fn-writes
languages: [cairo]
message: View function $FN should not be able to modify state
message: View function $FN should not write to the state
severity: ERROR
metadata:
category: security
Expand Down

0 comments on commit 75073c2

Please sign in to comment.