Skip to content

Security issues #23

Description

@circle-aloychan

General

  1. Missing SECURITY.md file
  2. JS Dependencies are not locked via a lock file, nor within the package.json file
    • "dependencies": {
      "next": "latest",
      "next-auth": "latest",
      "react": "^18.2.0",
      "react-dom": "^18.2.0",
      "apollo-server-micro": "^3.7.0",
      "graphql": "^16.6.0",
      "jsonwebtoken": "^9.0.0",
      "@apollo/client": "^3.7.0"
      },
      "devDependencies": {
      "typescript": "^4.9.4",
      "@types/node": "^18.11.9",
      "@types/react": "^18.0.24"
      },
  3. Public repository

Backend

  1. 3P dependencies used -- unsure if the deps are reviewed
  2. Unsanitized logs
  3. Non atomic amount transfer
    • if (!balances.containsKey(from) || !balances.containsKey(to)) {
      logger.warning("Invalid transaction: Account not found for " + from + " or " + to);
      throw new Exception("Invalid transaction: Account not found for " + from + " or " + to);
      }
      if (balances.get(from) < amount) {
      logger.warning("Transaction failed: Insufficient funds in account: " + from);
      throw new Exception("Insufficient funds in account: " + from);
      }
      balances.put(from, balances.get(from) - amount);
      balances.put(to, balances.get(to) + amount);
  4. API keys stored in plain text

Frontend

  1. Too permissive perms for the User role
  2. UserId passed in as params, allow any users to view any other user's data
  3. Able to view any user's loans
  4. Able to read all users' transaction history
  5. APIs are public? / do not have authentication schemes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions