Repository navigation
feat: allow kernel-bot to run security analysis. - #922
Conversation
|
/kernel-bot security |
|
Invalid command. Use |
|
I am afraid we cannot test it without merging to |
drbh
left a comment
There was a problem hiding this comment.
looks good overall, but I think we should move the dispatch logic into the dispatch.py file and update the do_dispatch_release function to take any new args needed to conditionally trigger the security workflow.
**also I think maybe some of the existing function names could be improved (ie maybe dispatch_release should be dispatch?) if you want to make any changes to that feel free to update. however we can totally improve in another PR, and was just a thought since you're touching these files
| "merge-and-upload": {"admin"}, | ||
| "release": {"admin"}, | ||
| } | ||
| SECURITY_WORKFLOW = "security-audit.yml" |
There was a problem hiding this comment.
I think this should be in dispatch.py since that is where we list the other workflows we trigger
| def dispatch_workflow( | ||
| api_base: str, | ||
| token: str, | ||
| workflow_filename: str, | ||
| ref: str, | ||
| inputs: dict, | ||
| ): | ||
| url = f"{api_base}/actions/workflows/{workflow_filename}/dispatches" | ||
| github_api_request(url, token, method="POST", data={"ref": ref, "inputs": inputs}) | ||
|
|
||
|
|
||
| def dispatch_security_audit( | ||
| api_base: str, | ||
| token: str, | ||
| default_branch: str, | ||
| issue_number: int, | ||
| pr_head_sha: str | None, | ||
| ): | ||
| dispatch_key = make_dispatch_key(issue_number, "security") | ||
| dispatch_workflow( | ||
| api_base, | ||
| token, | ||
| SECURITY_WORKFLOW, | ||
| default_branch, | ||
| { | ||
| "pr_number": str(issue_number), | ||
| "dispatch_key": dispatch_key, | ||
| "head_sha": pr_head_sha or "", | ||
| }, | ||
| ) | ||
| return DispatchResult(kernel_name="security", dispatch_key=dispatch_key) |
There was a problem hiding this comment.
this logic should probably also be in the dispatch script too, so we follow the existing patterns
* chore: adding liger tiled mlp kernels * liger-kernels: test with Triton ROCm binary wheels * chore: align layer to pure --------- Co-authored-by: Daniël de Kok <me@danieldk.eu>
* add fp4 matmul kernels for deepseek v4 flash Signed-off-by: Wang, Yi <yi.a.wang@intel.com> * add missing source code.. Signed-off-by: Wang, Yi <yi.a.wang@intel.com> * update Signed-off-by: Wang, Yi <yi.a.wang@intel.com> * update to w4a8 Signed-off-by: Wang, Yi <yi.a.wang@intel.com> * update Signed-off-by: Wang, Yi <yi.a.wang@intel.com> * perf optimization add add benchmark_perf.py script Signed-off-by: Wang, Yi <yi.a.wang@intel.com> * structure * standarize all kernels and testing around the same api * better testing framework * fix batched with sentinels * tests with sentinels as well * test static and support ue8m0 * specify v2 as the version * cleanup * naming convention * update readme * remove bench * format * update readme * trigger * skip tests on < sm89 * drop sm89 testing, too error prone * Use triton-rocm-fixes branch to pass build * Update build.toml * Fix Torch ops * Remove custom path insertion This breaks tests in kernel-builder devshells --------- Signed-off-by: Wang, Yi <yi.a.wang@intel.com> Co-authored-by: Wang, Yi <yi.a.wang@intel.com> Co-authored-by: Daniël de Kok <me@danieldk.eu>
This reverts commit e06068f.
This reverts commit a913728.
This reverts commit 3d9bb2f.
This reverts commit 9f9d5e1.
|
@drbh your comments are addressed now. PTAL. |
🔒 Security Audit — findings detectedAn automated, AI-generated security review of this PR flagged the following. These may include false positives — review each item before acting. I have a clear finding. The validation step explicitly intended to "Guard against injection" itself contains a script injection vulnerability — it interpolates [MEDIUM] case "${{ inputs.pr_number }}" inA dispatcher who supplies - name: Validate PR number
env:
PR_NUMBER: ${{ inputs.pr_number }}
run: |
case "${PR_NUMBER}" in
''|*[!0-9]*)
echo "Invalid pr_number input: must be numeric"
exit 1
;;
esacAudited head SHA |
Fixes #901
Additionally,
kernel-bot securityafter initially vetting that a PR doesn't have any jailbreaking instructions.