CodeAnt AI home pagelight logodark logo
  • Dashboard
  • Dashboard
  • Documentation
  • Demo Call with CEO
  • Blog
  • Slack
  • Get Started
    • CodeAnt AI
    • Setup
    • Control Center
    • Pull Request Review
    • IDE
    • Compliance
    • Anti-Patterns
    • Code Governance
    • Infrastructure Security Database
    • Application Security Database
      • Apex
      • Bash
      • C
      • Clojure
      • Cpp
      • Csharp
      • Dockerfile
      • Elixir
      • Fingerprints
      • Generic
      • Go
      • Html
      • Java
      • Javascript
      • Json
      • Kotlin
      • Ocaml
      • Php
      • Problem-based-packs
      • Python
      • Ruby
      • Rust
      • Scala
      • Solidity
      • Swift
        • Biometrics-and-auth
        • Commoncrypto
          • Hardcoded-iv
          • Hardcoded-pbkdf2-passphrase
          • Hardcoded-realm
          • Hardcoded-salt
            • Hardcoded salt
          • Hardcoded-symmetric-key
          • Insecure-crypto-aes-keysize
          • Insecure-crypto-algorithm-blowfish
          • Insecure-crypto-algorithm-des
          • Insecure-crypto-algorithm-rc4
          • Insecure-crypto-cbc-mode
          • Insecure-crypto-ecb-mode
          • Insecure-crypto-keystorage
          • Insecure-crypto-rsa-keysize
          • Insecure-hashing-algorithm-md2
          • Insecure-hashing-algorithm-md4
          • Insecure-hashing-algorithm-md5
          • Insecure-hashing-algorithm-sha1
          • Insufficient-pbkdf2-work-factor-sha1
          • Insufficient-pbkdf2-work-factor-sha256
          • Insufficient-pbkdf2-work-factor-sha512
          • Realmstate-encryption-missing
        • Cryptoswift
        • Insecure-communication
        • Lang
        • Pathtraversal
        • Sql
        • Sqllite
        • Webview
        • Webview
      • Terraform
      • Typescript
      • Yaml
    Hardcoded-salt

    Hardcoded salt

    Cryptographic operations were identified that leverage a hardcoded salt/nonce. A salt does not need to remain secret, but should be random, generated from cryptographically secure sources of entropy, such as an CSPRNG. On iOS/macOS platforms, secure random data can be obtained via the SecCopyRandomBytes API available from RandomizationServices.
    Likelihood: MEDIUM
    Confidence: HIGH
    CWE:
    - CWE-323: Nonces should be used for the present occasion and only once.
    OWASP:
    - A02:2021 - Cryptographic Failures

    Swift hardcoded realm keyHardcoded symmetric key
    twitterlinkedin
    Powered by Mintlify
    Assistant
    Responses are generated using AI and may contain mistakes.