mirror of
https://github.com/jmcorgan/fips.git
synced 2026-07-30 19:46:15 +00:00
Describe the trailing command accurately in the gate's finding message
For a value-returning helper the trailing echo is the return mechanism, not a log call. The hazard is the same either way -- it fixes the exit status at zero -- but calling it a log call misdescribes four of the sites the gate now finds.
This commit is contained in:
@@ -195,8 +195,8 @@ def main() -> int:
|
||||
print(f" last statement: {stmt[:100]}")
|
||||
print(f" status consumed by: {', '.join(callers)}")
|
||||
print(f" fix: add an explicit `return 0` as the last statement. Its "
|
||||
f"success value is currently whatever the log call returned, "
|
||||
f"which is 0 whatever the function did.")
|
||||
f"success value is currently the trailing command's, which is 0 "
|
||||
f"whatever the function did.")
|
||||
|
||||
print(f"trailing-log check: {scanned} function(s) scanned, "
|
||||
f"{shaped} end in a logging call, {len(ALLOWED)} allowed, "
|
||||
|
||||
Reference in New Issue
Block a user