gitlab.find_sec_bugs.TRUST_BOUNDARY_VIOLATION-1

unknown
Download Count*
License

A trust boundary can be thought of as line drawn through a program. On one side of the line, data is untrusted. On the other side of the line, data is assumed to be trustworthy. The purpose of validation logic is to allow data to safely cross the trust boundary - to move from untrusted to trusted. A trust boundary violation occurs when a program blurs the line between what is trusted and what is untrusted. By combining trusted and untrusted data in the same data structure, it becomes easier for programmers to mistakenly trust unvalidated data.

Run Locally

Run in CI

Defintion

rules:
  - id: find_sec_bugs.TRUST_BOUNDARY_VIOLATION-1
    patterns:
      - pattern-either:
          - patterns:
              - pattern: (HttpServletRequest $H). ... .setAttribute($ARG1, $ARG2);
              - pattern-not: (HttpServletRequest $H). ... .setAttribute("...", "...");
          - patterns:
              - pattern: (HttpServletRequest $H). ... .putValue($ARG1, $ARG2);
              - pattern-not: (HttpServletRequest $H). ... .putValue("...", "...");
    languages:
      - java
    message: >
      A trust boundary can be thought of as line drawn through a program. On one
      side

      of the line, data is untrusted. On the other side of the line, data is assumed

      to be trustworthy. The purpose of validation logic is to allow data to safely

      cross the trust boundary - to move from untrusted to trusted. A trust boundary

      violation occurs when a program blurs the line between what is trusted and what

      is untrusted. By combining trusted and untrusted data in the same data

      structure, it becomes easier for programmers to mistakenly trust unvalidated

      data.
    metadata:
      category: security
      cwe: "CWE-501: Trust Boundary Violation"
      primary_identifier: find_sec_bugs.TRUST_BOUNDARY_VIOLATION-1
      secondary_identifiers:
        - name: Find Security Bugs-TRUST_BOUNDARY_VIOLATION
          type: find_sec_bugs_type
          value: TRUST_BOUNDARY_VIOLATION
      license: MIT
    severity: WARNING