Repository navigation
ci: address the OpenSSF Scorecard findings - #19
Merged
Merged
Conversation
The Scorecard workflow now publishes its results, so the findings it reports have to be fixed instead of deferred. - License: add the MIT LICENSE at the repository root. The VS Code extension already carried one and was left untouched; the Dify plugin had none and got the same file, so the .difypkg carries its license too. - Security-Policy: add SECURITY.md with the private vulnerability reporting route, what counts as a vulnerability in this project, the disclosure timeline and the supported versions (0.5.0, the shared version line of both products). - Token-Permissions: move security-events: write from the workflow level to the CodeQL analyze job, and give each CI job an explicit contents: read. None of the five CI jobs pushes a commit, creates a release or uploads release assets, so they all stay read-only. - Pinned-Dependencies: pin every uses: in ci.yml and codeql.yml to a full commit SHA with the version in a trailing comment. The SHAs are the peeled commit of the tag, not the tag object. - Add the OpenSSF Scorecard badge to the README. Known remaining findings, left for a follow-up: Packaging, Code-Review, Signed-Releases, CII-Best-Practices, Fuzzing, Contributors, SAST.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The OSSF Scorecard workflow added in #17 now publishes its results, so the findings it reports have to be fixed rather than deferred. This PR addresses the License, Security-Policy, Token-Permissions and Pinned-Dependencies checks, and adds the Scorecard badge.
What changed
License (0/10)
VSC-plugin-MD2Docx-Converter/package.jsondeclares"license": "MIT", but the repository had no root LICENSE file.LICENSEat the repository root — the standard MIT text withCopyright (c) 2026 AlexMultiAgent.VSC-plugin-MD2Docx-Converter/LICENSEalready existed and was left untouched. It is the pre-existing file, byte-identical to the new root one.dify-plugin-MD2Docx/LICENSEwas added — that subdirectory had none, and the.difypkgis a separately distributed package, so it now carries its own license. All three LICENSE files are byte-identical..vscodeignore/.difyignorechange was needed:vsce packageruns insideVSC-plugin-MD2Docx-Converter/andscripts/package.pywalksdify-plugin-MD2Docx/, so the new rootLICENSEandSECURITY.mdare outside both packaging roots and cannot leak into the VSIX or the.difypkg. Verified withvsce ls(45 entries, noSECURITY.md) and with a freshpython scripts/package.pybuild (29 entries, containing the plugin's ownLICENSE, noSECURITY.md).Security-Policy (0/10)
Added
SECURITY.md(48 lines) at the repository root:https://github.com/AlexMultiAgent/mdocx-converter/security/advisories/new.VSC-plugin-MD2Docx-Converter/package.jsondeclares no email, so none was invented. (dify-plugin-MD2Docx/manifest.yamldoes carry a marketplacecontact:address; it was deliberately not copied intoSECURITY.md— it is Dify marketplace metadata, not the security contact for this repository.)VSC-plugin-MD2Docx-Converter/package.jsonanddify-plugin-MD2Docx/manifest.yaml; no version was bumped).Token-Permissions (9/10 → fixed)
.github/workflows/codeql.yml:permissions:block is now read-only —contents: read,actions: read,packages: read.security-events: writewas removed from it.analyzejob now carries its ownpermissions:block with the three read permissions plussecurity-events: write. Job-level permissions replace workflow-level ones in GitHub Actions, so the read permissions are repeated there. The CodeQL action only needs the write permission on its own job..github/workflows/ci.yml— every job was inspected individually:dify-plugin.difypkgand uploads it withactions/upload-artifactcontents: readvsc-pluginnpm run packageisvsce package --allow-missing-repository(a local.vsix, no publish); the upload isactions/upload-artifactcontents: readtemplate-synccontents: readpreset-paritycontents: readdependency-auditcontents: readNone of them writes to the repository, so all five now declare
permissions: contents: readexplicitly. The.difypkgand the.vsixleave the workflow through the Actions artifact API, not the repository contents API, so they do not need write access. The workflow-levelcontents: readwas already in place and is unchanged.Pinned-Dependencies
Every
uses:in.github/workflows/ci.ymland.github/workflows/codeql.ymlis now pinned to a full 40-character commit SHA with the version in a trailing# vX.Y.Zcomment. Each SHA was resolved withgit ls-remote <repo> refs/tags/<tag> refs/tags/<tag>^{}and the peeled commit was used —github/codeql-actiontags are annotated, so the tag-object SHA (e0462179…for v4.39.4) differs from the commit SHA (1bd86f2f…) and the latter is the correct one to pin.Every SHA was re-resolved and compared against the committed file content after the edit; all 20 pinned
uses:in the three workflows match (17 in the two files touched here, plus the 4 pre-existing pins inscorecard.yml, re-verified for good measure).Badge
Added the OpenSSF Scorecard badge directly below the H1 in
README.md(the README had no badge row).What was deliberately left alone
.github/workflows/scorecard.yml— it was already pinned and already had the correct read-only workflow-levelpermissions: {}with the writes scoped to the job. No change.multi-templates/,VSC-plugin-MD2Docx-Converter/src/profiles.tsand the Dify plugin sources — untouched. The template sync and preset parity gates still pass.Known remaining findings (out of scope for this PR)
Packaging, Code-Review, Signed-Releases, CII-Best-Practices, Fuzzing, Contributors, SAST.