0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

VS Code機能拡張の公開に失敗

Posted at

失敗の共有です。

VS Codeの機能拡張、novel-writerをVisual Studio Maketplaceで公開しています。つい先ほど version 3.4.17 をリリースしたのですが、更新日付とバージョンが一致していないことに気づきました。

Version	3.4.12
Released on	2021/4/12 11:26:28
Last updated	2026/1/29 14:40:58
Publisher	Taiyo Fujii
Unique Identifier	TaiyoFujii.novel-writer

3.4.12は10月公開したバージョンで、1月には3.4.13を公開したはず……しかし公開できていなかったらしい。Personal Access Tokenを失効させたので新しくトークンを作って公開していたのですが、何かの間違いで公開できていなかったらしい。

調査開始です(GPTに聞く)。

% vsce show TaiyoFujii.novel-writer --json


        "publisher": {
                "publisherId": "...",
                "publisherName": "TaiyoFujii",
                "displayName": "Taiyo Fujii",
        },
        "extensionId": "...",
        "extensionName": "novel-writer",
        "displayName": "novel-writer",
        "flags": 260,
        "lastUpdated": "2026-01-29T05:45:58.867Z",
        "publishedDate": "2021-04-12T02:26:28.210Z",
        "releaseDate": "2021-04-12T02:26:28.210Z",
        "shortDescription": "VS Codeの小説執筆を支援する機能拡張です",
        "versions": [
                {
                        "version": "3.4.17",
                        "flags": 0,
                        "lastUpdated": "2026-01-29T05:06:42.130Z",
                        "validationResultMessage": "{\"results\":[{\"status\":\"success\",\"source\":\"PackageValidationStep\",\"reports\":[],\"message\":\"\",\"details\":[]},{\"status\":\"failure\",\"source\":\"SecretScanStep\",\"reports\":[],\"message\":\"Your package contains secrets which may leak sensitive information. Remove the secrets and re-upload your extension.\",\"details\":[{\"style\":\"Unordered\",\"items\":[\"'…ygi27q' is an apparent Azure DevOps legacy personal access token (PAT). in extension/secret.md (Line 1, Column 14)\",\"'…DO1XYb' is an apparent Azure DevOps identifiable personal access token (PAT). in extension/secret.md (Line 4, Column 1)\",\"'…DO7rOA' is an apparent Azure DevOps identifiable personal access token (PAT). in extension/secret.md (Line 7, Column 14)\",\"'…DO3wvE' is an apparent Azure DevOps identifiable personal access token (PAT). in extension/secret.md (Line 9, Column 1)\"],\"type\":\"list\"}]}]}"
                },

公開できていた、と思っていたバージョンにvalidationResultMessage出ていました。secret.mdというファルにアクセストークンらしいテキストが含まれているぞ、とのこと。顔真っ青になりましたね。1月にアクセストークンを作り直した時、vsceのログインに使うアクセストークンをメモして保存していたのです。

.vscodeignore ファイルに secret.md を追加してもう一度 % vsce publish。これで無事に機能拡張を公開することができました(.gitignore にはもう書いてありました)。それからファイルも別の場所に動かしました。

教訓

アクセストークンを保存する必要があるときは、鍵付きの場所に保存しましょう。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?