You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Running r2c-security-audit on a C codebase results in FileNotFoundError: [Errno 2] No such file or directory: ‘NO FILE INFO YET’
Traceback (most recent call last):
File "/usr/local/bin/semgrep", line 33, in <module>
sys.exit(load_entry_point('semgrep==0.27.0', 'console_scripts', 'semgrep')())
File "/usr/local/Cellar/semgrep/0.27.0/libexec/lib/python3.8/site-packages/semgrep/__main__.py", line 17, in main
cli()
File "/usr/local/Cellar/semgrep/0.27.0/libexec/lib/python3.8/site-packages/semgrep/cli.py", line 372, in cli
semgrep.semgrep_main.main(
File "/usr/local/Cellar/semgrep/0.27.0/libexec/lib/python3.8/site-packages/semgrep/semgrep_main.py", line 223, in main
rule_matches_by_rule, debug_steps_by_rule, semgrep_errors, stats_line = CoreRunner(
File "/usr/local/Cellar/semgrep/0.27.0/libexec/lib/python3.8/site-packages/semgrep/core_runner.py", line 523, in invoke_semgrep
findings_by_rule, debug_steps_by_rule, errors, num_targets = self._run_rules(
File "/usr/local/Cellar/semgrep/0.27.0/libexec/lib/python3.8/site-packages/semgrep/core_runner.py", line 491, in _run_rules
rule_matches, debugging_steps, errors, rule_targets = self._run_rule(
File "/usr/local/Cellar/semgrep/0.27.0/libexec/lib/python3.8/site-packages/semgrep/core_runner.py", line 394, in _run_rule
errors.extend(
File "/usr/local/Cellar/semgrep/0.27.0/libexec/lib/python3.8/site-packages/semgrep/core_runner.py", line 395, in <genexpr>
CoreException.from_json(e, language, rule.id).into_semgrep_error()
File "/usr/local/Cellar/semgrep/0.27.0/libexec/lib/python3.8/site-packages/semgrep/core_exception.py", line 80, in into_semgrep_error
with open(self._path, errors="replace") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'NO FILE INFO YET'
semgrep --debug --config "https://semgrep.dev/p/r2c-security-audit" .
trying to download from https://semgrep.dev/p/r2c-security-audit
using config from https://semgrep.dev/p/r2c-security-audit. Visit https://semgrep.dev/registry to see all public rules.
downloading config...
loaded 1 configs in 4.777460098266602
running 214 rules from 1 config remote-url
running 214 rules...
Running rule c.lang.security.insecure-use-gets-fn.insecure-use-gets-fn...
type argument, maybe wrong typedef inference!
(Argument
(ArgType
({ const = None; volatile = None },
(TypeName (None, [], (IdIdent ("args1", ())))))))
type argument, maybe wrong typedef inference!
(Argument
(ArgType
({ const = None; volatile = None },
(Pointer ((),
({ const = None; volatile = None },
(StructUnionName ((Struct, ()), ("rlp", ()))))
)))))
[snip]
To Reproduce
As this is not open source code, I can't recommend a way to reproduce, but happy to help narrow things down.
Expected behavior
Semgrep to run normally
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
If not using semgrep.dev: are you running off docker, an official binary, a local build?
Brew-installed macOS Catalina
The text was updated successfully, but these errors were encountered:
@aryx do you know when and why this error occurs? It would be helpful if we added more debugging context around this error, like what file(s) are causing the error.
I have the same error caused by code: myWindow = NewCWindow(nil, &wRect, "\pHello", true, zoomNoGrow, (WindowRef) -1, true, 0);
The issue is gone after removing \p
We're now gracefully handling this error case: #1999
This error either means Semgrep is running over invalid code, or there's a bug in our parsing. Either way, we shouldn't see NO FILE INFO YET anymore after the 0.31.0 release of Semgrep. I'm going to close this issue out, if you see lexical errors please open a new issue with the relevant pattern and code snippet. Thanks!
Describe the bug
Running r2c-security-audit on a C codebase results in
FileNotFoundError: [Errno 2] No such file or directory: ‘NO FILE INFO YET’
To Reproduce
As this is not open source code, I can't recommend a way to reproduce, but happy to help narrow things down.
Expected behavior
Semgrep to run normally
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
If not using semgrep.dev: are you running off docker, an official binary, a local build?
Brew-installed macOS Catalina
The text was updated successfully, but these errors were encountered: