mirror of
https://github.com/K-Dense-AI/scientific-agent-skills.git
synced 2026-12-05 02:23:59 +08:00
Update security scanning process and documentation
- Enhanced the README to clarify the publication of security scan results to a dedicated markdown file. - Modified `scan_skills.py` to generate both a human-readable report and a machine-readable JSON report, ensuring consistency checks before CI publishing. - Updated the GitHub Actions workflow to validate the scan report and commit the new reports, replacing the previous SECURITY.md approach with separate report files. This change improves the clarity and accessibility of security information for users and contributors.
This commit is contained in:
1 parent
bf383691e2
commit
d77f819637
6 files changed
+381
-3802
No files matched your search
@@ -31,14 +31,33 @@ jobs:
|
||||
SKILL_SCANNER_LLM_MODEL: ${{ vars.SKILL_SCANNER_LLM_MODEL || 'claude-sonnet-5' }}
|
||||
run: uv run python scan_skills.py
|
||||
|
||||
- name: Commit updated SECURITY.md
|
||||
# Gate: a scan that contradicts the contents of skills/ must not be
|
||||
# published. A non-zero exit here fails the job, so the commit step below
|
||||
# is skipped and the previous report stays in place.
|
||||
- name: Validate scan report
|
||||
run: uv run python validate_report.py
|
||||
|
||||
- name: Upload report artifact
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: security-report
|
||||
path: |
|
||||
docs/security-report.md
|
||||
docs/security-report.json
|
||||
if-no-files-found: warn
|
||||
|
||||
- name: Commit updated security report
|
||||
run: |
|
||||
git diff --quiet SECURITY.md && exit 0
|
||||
if [ -z "$(git status --porcelain docs/security-report.md docs/security-report.json)" ]; then
|
||||
echo "Report unchanged; nothing to commit."
|
||||
exit 0
|
||||
fi
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git stash --include-untracked
|
||||
git pull --rebase
|
||||
git stash pop || true
|
||||
git add SECURITY.md
|
||||
git add docs/security-report.md docs/security-report.json
|
||||
git commit -m "chore: update security scan report [skip ci]"
|
||||
git push
|
||||
Reference in new issue
Block a user