OSV scanner fails with following error:
stderr: |
/Users/dk/.cache/trunk/plugins/https---github-com-trunk-io-plugins/v1.10.1-4ebadccd80b22638/linters/osv-scanner/osv_to_sarif.py:139: SyntaxWarning: "\s" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\s"? A raw string is also an option.
f'(^|\s)({pkg["name"]})($|\s)',
/Users/dk/.cache/trunk/plugins/https---github-com-trunk-io-plugins/v1.10.1-4ebadccd80b22638/linters/osv-scanner/osv_to_sarif.py:139: SyntaxWarning: "\s" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\s"? A raw string is also an option.
f'(^|\s)({pkg["name"]})($|\s)',
Traceback (most recent call last):
File "/Users/dk/.cache/trunk/plugins/https---github-com-trunk-io-plugins/v1.10.1-4ebadccd80b22638/linters/osv-scanner/osv_to_sarif.py", line 203, in <module>
main(sys.argv)
~~~~^^^^^^^^^^
File "/Users/dk/.cache/trunk/plugins/https---github-com-trunk-io-plugins/v1.10.1-4ebadccd80b22638/linters/osv-scanner/osv_to_sarif.py", line 149, in main
if pkg["name"].lower() != affected_pkg["package"]["name"].lower():
~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'package'
looking at the line the error makes sense because how escaping works in Python 3.12+
|
f'(^|\s)({pkg["name"]})($|\s)', |
System info:
MacOS: 26.5.2 (25F84)
trunk version: 1.25.0
runtime: python@3.14.4
plugins version: v1.10.1
osv-scanner@2.2.4
OSV scanner fails with following error:
looking at the line the error makes sense because how escaping works in Python 3.12+
plugins/linters/osv-scanner/osv_to_sarif.py
Line 139 in d1e3af5
System info:
MacOS: 26.5.2 (25F84)
trunk version: 1.25.0
runtime: python@3.14.4
plugins version: v1.10.1
osv-scanner@2.2.4