Run github/codeql-action/upload-sarif@v1
with:
sarif_file: .
checkout_path: /home/runner/work/jellyfin-androidtv/jellyfin-androidtv
token: ***
matrix: null
env:
JAVA_HOME: /opt/hostedtoolcache/Java_Adopt_jdk/11.0.10-9/x64
Uploading sarif files: ["/home/runner/work/jellyfin-androidtv/jellyfin-androidtv/app/build/reports/detekt/detekt.sarif","/home/runner/work/jellyfin-androidtv/jellyfin-androidtv/app/build/reports/lint-results.sarif"]
Error: EISDIR: illegal operation on a directory, read
Error: EISDIR: illegal operation on a directory, read
at Object.readSync (fs.js:506:3)
at tryReadSync (fs.js:331:20)
at Object.readFileSync (fs.js:368:19)
at Object.addFingerprints (/home/runner/work/_actions/github/codeql-action/v1/lib/fingerprints.js:239:33)
at uploadFiles (/home/runner/work/_actions/github/codeql-action/v1/lib/upload-lib.js:249:33)
at Object.uploadFromActions (/home/runner/work/_actions/github/codeql-action/v1/lib/upload-lib.js:123:18)
at async run (/home/runner/work/_actions/github/codeql-action/v1/lib/upload-sarif-action.js:34:29)
at async runWrapper (/home/runner/work/_actions/github/codeql-action/v1/lib/upload-sarif-action.js:46:9) {
errno: -21,
syscall: 'read',
code: 'EISDIR'
}
The Android linter started supporting sarif files in the latest version (4.2). When trying it out in one of my projects (https://github.com/jellyfin/jellyfin-androidtv) it failed uploading the artifact. This is because one of the linter rules adds a directory as uri in the locations object. The fingerprinting code assumes it is a file and tries to fingerprint the directory. The specification says that an uri should be pointing to a file (https://rawgit.com/sarif-standard/sarif-spec/master/Static Analysis Results Interchange Format (SARIF).html#fileformat-uriproperties) but I don't expect this action to fail.
Error:
File that should reproduce the issue:
android-lint.sarif.txt