Skip to content

Usage of floating pragma  #17

Open
safe-global/safe-modules
#458
@hats-bug-reporter

Description

Github username: @@giorgiodalla
Twitter username: 0xAuditism
Submission hash (on-chain): 0xf8de327cbd43eb23fcf2c5b769f076dc475ce3cae496ff82150905b23006f7a1
Severity: low

Description:
Description
All contracts in scope have flaoting pragma.
Pragma directives should be fixed to clearly identify the Solidity version with which the contracts will be compiled.
Note that libraries can still be used with floating pragmas.

Attack Scenario
Describe how the vulnerability can be exploited.

Attachments

  1. Proof of Concept (PoC) File
@> pragma solidity >=0.8.0;

import {SignatureValidator} from "../base/SignatureValidator.sol";
import {ISafe} from "../interfaces/ISafe.sol";
import {P256, WebAuthn} from "../libraries/WebAuthn.sol";

/**
 * @title Safe WebAuthn Shared Signer
 * @dev A contract for verifying WebAuthn signatures shared by all Safe accounts. This contract uses
 * storage from the Safe account itself for full ERC-4337 compatibility.
 */
contract SafeWebAuthnSharedSigner is SignatureValidator {
  1. Revised Code File (Optional)
    Consider adding fixed pragmas, this can be done such as:
-pragma solidity >=0.8.0;
+pragma solidity >=0.8.0;
import {SignatureValidator} from "../base/SignatureValidator.sol";
import {ISafe} from "../interfaces/ISafe.sol";
import {P256, WebAuthn} from "../libraries/WebAuthn.sol";

/**
 * @title Safe WebAuthn Shared Signer
 * @dev A contract for verifying WebAuthn signatures shared by all Safe accounts. This contract uses
 * storage from the Safe account itself for full ERC-4337 compatibility.
 */
contract SafeWebAuthnSharedSigner is SignatureValidator {

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions