Secret Vault on Aptos

First Flight #46
Beginner FriendlyWallet
100 EXP
View results
Submission Details
Severity: high
Valid

Inappropriate Function Visibility Pattern

Description

The get_secret() function is marked as #[view] but handles sensitive data retrieval. View functions are typically used for read-only operations that don't require transaction signing.

#[view]
public fun get_secret (caller: address):String acquires Vault{

Impact

  • Potential security implications for sensitive data access

  • Inconsistent access pattern compared to set_secret()

  • May not provide proper transaction authentication

Recommendation

Consider changing to entry function for better security:

public entry fun get_secret(caller: &signer) acquires Vault {
let caller_address = signer::address_of(caller);
let vault = borrow_global<Vault>(caller_address);
// Handle secret retrieval with proper authentication
}
Updates

Lead Judging Commences

bube Lead Judge
19 days ago
bube Lead Judge 18 days ago
Submission Judgement Published
Validated
Assigned finding tags:

Lack of signer check in `get_secret`

Appeal created

0xiamwai Submitter
18 days ago
bube Lead Judge
16 days ago
bube Lead Judge 15 days ago
Submission Judgement Published
Validated
Assigned finding tags:

Lack of signer check in `get_secret`

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.