試運転ブログ

技術的なあれこれ

2022-01-01から1年間の記事一覧

cosign実行時のやりとりを覗いてみた

cosign のコマンドを実行した時に、sigstore関連のサーバにどういったリクエストが飛ぶのかが気になり調べてみました。 $ cat test-result.json {"passed": true} $ COSIGN_EXPERIMENTAL=1 cosign attest --type 'https://example.com/TestResult/v1' --pred…

Golangのjson.Unmarshalとjson.Decoder.Decodeの違い

Golang標準のjsonパッケージでは、jsonをstructに展開する方法として、 json.Unmarshal という関数と、 json.NewDecoder でデコーダを生成し、 Decode 関数を呼ぶ方法がある。 インターフェイスは、 func Unmarshal(data []byte, v any) error func NewDecod…

in-toto attestation の仕様とcosignでの使われ方

はじめに anchoreのsyftが最近対応したattestationの出力 に使われている in-toto attestation format の仕様を調査をしたので、備忘録としてまとめておきます。 調べながらの記述となっており、不正確な情報も含まれているかもしれないです。何か気づいたこ…