GitHub Actions accepts invalid YAML

github-actions-accepts-yaml-that-violates-the-spec_gen_1795394997866-600x400-1

TL;DR: GitHub Actions accepts several invalid YAML productions, making it difficult (read: impossible) to parse some real-world action and workflow definitions with a properly conforming YAML parser. This is related to zizmor#1116, which has been bugging me for a year and a half. Last April, a user reported that zizmor was rejecting a workflow containing a step that looks like this: – name: Create NPM Remote Repository JSON uses: jsdaniell/create-json@v1.2.3 with: name: “npm-remote-template.json” json: ‘{ “key”: “npm-remote”, “rclass”: “remote”, “packageType”: “npm”, “url”: “https://registry.npmjs.org” }’ Apart from the use of a multi-line flow-style string for the json: key, nothing particularly stands out about this step. Except: it isn’t valid YAML! YAML says this about flow-style…

Continue reading at Lobste.rs yossarian.net
Advertisement