github / github/codeql

CodeQL adds redundant slash to upload sarif file endpoint

未关闭
#15,020 17 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
question
主要语言
CodeQL
星标
10.1k
派生
2.1k
平均合并
2 天 15 小时
30 天内合并 PR
141

描述

I use Azure DevOps pipeline to perform CodeQL code scanning. It goes well until I try to upload sarif file to github. I use this command to do upload: `echo $(Github.TOKEN) | $(codeql) github upload-results --repository=$(Owner)/$(Repo) --ref=$(Build.SourceBranch) --commit=$(Build.SourceVersion) --sarif=$(sarifOutput) --github-auth-stdin --github-url=https://github.com`. In result CodeQL tries to upload sarif file using endpoint `https://api.github.com//repos/owner_name/repo_name/code-scanning/sarifs`. There is redundant slash in the url so I get 404 response. Do you have idea what is wrong and how to fix?

贡献指南

打开贡献指南

调研方向

首先,使用 CodeQL 的 `github upload-results` 重现 Azure DevOps 命令,并将生成的端点与预期的 GitHub URL 进行比较。跟踪 upload-results URL 的构造,然后验证 SARIF 上传不再请求带有多余斜杠的路径,并且能够成功访问 repository 端点。

由索引模型根据 Issue 内容生成。

评估

技术栈
azure, github
领域
api, ci-cd, security
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。