Uploaded image for project: 'OpenShift GitOps'
  1. OpenShift GitOps
  2. GITOPS-6632

REVERSE_INULL (CWE-476)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • None
    • None
    • None
    • GitOps Crimson Sprint 17, GitOps Crimson Sprint 18

      Description of Problem

      Error: REVERSE_INULL (CWE-476): [#def8]

      rollout_extension/app/ui/src/index.tsx:22:9: deref: Accessing a property of "spec.strategy".
      rollout_extension/app/ui/src/index.tsx:24:23: check_after_deref: Checking "spec.strategy === null" suggests "spec.strategy" may be null, but it has already been used as a function or its properties have been accessed on all paths leading to the check.
      #   22|       if (spec.strategy.canary) {
      #   23|           ro.strategy = 'Canary';
      #   24|->         const steps = spec.strategy?.canary?.steps || [];
      #   25|           ro.steps = steps;
      #   26|   
      

       

      Error: REVERSE_INULL (CWE-476): [#def9]

      rollout_extension/app/ui/src/index.tsx:203:33: deref: Accessing a property of "rs".
      rollout_extension/app/ui/src/index.tsx:225:34: check_after_deref: Checking "rs === null" suggests "rs" may be null, but it has already been used as a function or its properties have been accessed on all paths leading to the check.
      #  223|                       }
      #  224|                   }
      #  225|->                 ownedReplicaSets[rs?.name] = {
      #  226|                       objectMeta: {
      #  227|                           name: rs.name,

       

      https://cov01.lab.eng.brq2.redhat.com/covscanhub/task/841415/log/openshift-gitops-argocd-extensions-container-v1.16.0-15/scan-results-all.html

      Problem Reproduction

      • SAST scan results from v1.16.0-15 RC

      Fix Approaches

      • TBD

      Acceptance Criteria

      • TBD

              nmirasch@redhat.com Neus Miras Chueca
              rhn-support-vab Varsha B
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: