• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IBM / unitxt / 37196599562
78%

Build:
DEFAULT BRANCH: main
Ran 04 Oct 2026 10:52AM UTC
Jobs 1
Files 64
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 Oct 2026 10:49AM UTC coverage: 78.319% (-2.5%) from 80.854%
37196599562

push

github

web-flow
Security: Fix CodeQL alerts for ReDoS, path injection, and workflow permissions (#1984)

* Security: Fix CodeQL alerts for ReDoS, path injection, workflow permissions

Remediates the 17 open CodeQL code-scanning alerts reported in the IBM OSPO
security notification (#1981).

1. ReDoS in is_camel_case() -- 1x py/redos, HIGH (CWE-1333)

   src/unitxt/text_utils.py: the pattern "^[A-Z]+([a-z0-9]*[A-Z]*[a-z0-9]*)*$"
   has an inner group that matches the empty string with overlapping
   alternatives, so a non-matching input backtracks catastrophically. An
   18-character input did not complete within 20 seconds.

   Reachable from artifact.py:215, which calls is_camel_case() on artifact
   class names.

   Replaced with the equivalent linear-time form "^[A-Z]+[a-zA-Z0-9]*$".
   Equivalence verified against all 538 registered Artifact subclass names and
   an exhaustive fuzz over the relevant character classes: zero disagreements.
   A 50,000-character adversarial input now completes in 0.6ms.

2. Path injection from CLI arguments -- 5x py/path-injection, HIGH (CWE-22)

   src/unitxt/evaluate_cli.py: --output_path and --output_file_prefix flowed
   from argparse into five filesystem sinks without validation (os.makedirs,
   two result-file writes, and os.listdir/open in extract_scores). A prefix
   such as '../../../etc/cron.d/x' escaped the output directory.

   Added two helpers:
   - _normalize_directory(): realpath/expanduser the directory inputs. The
     resolved location is deliberately not confined to the CWD, since writing
     results to an arbitrary directory is the documented purpose of
     --output_path.
   - _validate_filename_component(): reject a prefix containing a path
     separator, or equal to '.'/'..'. This is the actual vulnerability -- a
     filename prefix has no legitimate reason to contain a separator.

   extract_scores() now normalizes its directory and confirms each path built
   from the listing stays inside it before openi... (continued)

2785 of 4018 branches covered (69.31%)

Branch coverage included in aggregate %.

10974 of 13550 relevant lines covered (80.99%)

0.81 hits per line

Coverage Regressions

Lines Coverage ∆ File
96
58.68
-1.18% unitxt/evaluate_cli.py
17
88.06
-3.38% unitxt/text_utils.py
Jobs
ID Job ID Ran Files Coverage
1 37196599562.1 04 Oct 2026 10:52AM UTC 64
78.32
GitHub Action Run
Source Files on build 37196599562
  • Tree
  • List 64
  • Changed 56
  • Source Changed 0
  • Coverage Changed 56
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #37196599562
  • 9ef4e23d on github
  • Prev Build on main (#26506100559)
  • Next Build on main (#37196919318)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc