Build 152 success

gitbay-security on main · 4aeccd1085 · queued 2026-11-01 07:29 UTC · finished 2026-11-01 08:18 UTC · ran 1m25s

setup
$ git clone ssh://git@127.0.0.1/krz/omaha-metro-blotter.git (4aeccd1085)
step 1/2 mkdir -p "$GITBAY_RESULTS"

step 2/2 opengrep scan --quiet --disable-version-check --config /opt/opengrep-rules --sarif-output="$GITBAY_RESULTS/opengrep.sarif" .
                    
                    
┌──────────────────┐
│ 17 Code Findings │
└──────────────────┘
                      
    ci/pull-publish.sh
     ❱ opt.opengrep-rules.bash.lang.correctness.unquoted-variable-expansion-in-command
          Variable expansions must be double-quoted so as to prevent being split into multiple pieces        
          according to whitespace or whichever separator is specified by the IFS variable. If you really wish
          to split the variable's contents, you may use a variable that starts with an underscore e.g. $_X   
          instead of $X, and semgrep will ignore it. If what you need is an array, consider using a proper   
          bash array.                                                                                        
                                                                                                             
           10┆ if $SSH $HOST release asset get $R archive metro.db.gz > metro.db.gz 2>/dev/null && [ -s
               metro.db.gz ]; then                                                                     
            ⋮┆----------------------------------------
           12┆ elif $SSH $HOST release asset get $R archive metro.db.new.gz > metro.db.gz 2>/dev/null && [
               -s metro.db.gz ]; then                                                                     
            ⋮┆----------------------------------------
           77┆ $SSH $HOST release asset remove $R archive metro.db.new.gz 2>/dev/null || true
            ⋮┆----------------------------------------
           78┆ $SSH $HOST release asset add $R archive metro.db.new.gz < metro.db.gz
            ⋮┆----------------------------------------
           79┆ $SSH $HOST release asset remove $R archive metro.db.gz 2>/dev/null || true
            ⋮┆----------------------------------------
           80┆ $SSH $HOST release asset add $R archive metro.db.gz < metro.db.gz
            ⋮┆----------------------------------------
           81┆ $SSH $HOST release asset remove $R archive metro.db.new.gz 2>/dev/null || true
            ⋮┆----------------------------------------
          101┆ $SSH $HOST "release edit $R archive --title 'Incident archive' --file -" < notes.md
                       
    fetch_boundaries.py
    ❯❱ opt.opengrep-rules.python.lang.security.audit.dynamic-urllib-use-detected
          Detected a dynamic value being used with urllib. urllib supports 'file://' schemes, so a dynamic    
          value controlled by a malicious actor may allow them to read arbitrary files. Audit uses of urllib  
          calls to ensure user data cannot control the URLs, or consider using the 'requests' library instead.
                                                                                                              
           42┆ with urllib.request.urlopen(req, timeout=120, context=CTX) as r:
             
    ingest.py
    ❯❱ opt.opengrep-rules.python.lang.security.audit.dynamic-urllib-use-detected
          Detected a dynamic value being used with urllib. urllib supports 'file://' schemes, so a dynamic    
          value controlled by a malicious actor may allow them to read arbitrary files. Audit uses of urllib  
          calls to ensure user data cannot control the URLs, or consider using the 'requests' library instead.
                                                                                                              
          132┆ with urllib.request.urlopen(req, timeout=120, context=SSL_CTX) as r:
   
    ❯❱ opt.opengrep-rules.python.lang.security.audit.formatted-sql-query
          Detected possible formatted SQL query. Use parameterized queries instead.
                                                                                   
          227┆ conn.execute(f"CREATE TEMP TABLE incoming ({','.join(COLUMNS)}, digest, raw)")
   
   ❯❯❱ opt.opengrep-rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query
          Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL
          Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy      
          provides TextualSQL to easily used prepared statement with named parameters. For complex SQL        
          composition, use SQL Expression Language or Schema Definition Language. In most cases, SQLAlchemy   
          ORM will be a better option.                                                                        
                                                                                                              
          227┆ conn.execute(f"CREATE TEMP TABLE incoming ({','.join(COLUMNS)}, digest, raw)")
            ⋮┆----------------------------------------
          232┆ conn.execute(
          233┆     f"""INSERT OR IGNORE INTO incidents ({cols}, digest, first_seen)
          234┆         SELECT {cols}, digest, ? FROM temp.incoming""", (now,))
            ⋮┆----------------------------------------
          235┆ amended = conn.execute(
          236┆     f"""INSERT OR IGNORE INTO incident_amendments ({cols}, digest, seen_at)
          237┆         SELECT i.{', i.'.join(COLUMNS)}, i.digest, ?
          238┆         FROM temp.incoming i
          239┆         JOIN incidents o
          240┆           ON o.source = i.source AND o.source_key = i.source_key
          241┆         WHERE o.digest <> i.digest""", (now,)).rowcount
   
    ❯❱ opt.opengrep-rules.python.lang.security.audit.dynamic-urllib-use-detected
          Detected a dynamic value being used with urllib. urllib supports 'file://' schemes, so a dynamic    
          value controlled by a malicious actor may allow them to read arbitrary files. Audit uses of urllib  
          calls to ensure user data cannot control the URLs, or consider using the 'requests' library instead.
                                                                                                              
          325┆ with urllib.request.urlopen(req, timeout=180, context=SSL_CTX) as r:
   
    ❯❱ opt.opengrep-rules.python.lang.security.audit.formatted-sql-query
          Detected possible formatted SQL query. Use parameterized queries instead.
                                                                                   
          473┆ rows = conn.execute(
          474┆     f"SELECT source, source_key, {payload} FROM incidents").fetchall()
   
   ❯❯❱ opt.opengrep-rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query
          Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL
          Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy      
          provides TextualSQL to easily used prepared statement with named parameters. For complex SQL        
          composition, use SQL Expression Language or Schema Definition Language. In most cases, SQLAlchemy   
          ORM will be a better option.                                                                        
                                                                                                              
          473┆ rows = conn.execute(
          474┆     f"SELECT source, source_key, {payload} FROM incidents").fetchall()

results uploaded