Skip to content

Commit 6b5b166

Browse files
Merge pull request #700 from LaurentGoderre/check-js-yaml
Verify the js-yaml package integrity
2 parents f4bf68a + 1e10aea commit 6b5b166

File tree

6 files changed

+36
-24
lines changed

6 files changed

+36
-24
lines changed

5.0/Dockerfile

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

6.0/Dockerfile

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

7.0/Dockerfile

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

8.0-rc/Dockerfile

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

8.0/Dockerfile

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile-linux.template

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ RUN set -eux; \
2222
ENV GOSU_VERSION 1.17
2323
# grab "js-yaml" for parsing mongod's YAML config files (https://github.com/nodeca/js-yaml/releases)
2424
ENV JSYAML_VERSION 3.13.1
25+
ENV JSYAML_CHECKSUM 662e32319bdd378e91f67578e56a34954b0a2e33aca11d70ab9f4826af24b941
2526

2627
RUN set -eux; \
2728
\
@@ -45,10 +46,11 @@ RUN set -eux; \
4546
\
4647
# download/install js-yaml
4748
mkdir -p /opt/js-yaml/; \
48-
wget -O /opt/js-yaml/js-yaml.js "https://github.com/nodeca/js-yaml/raw/${JSYAML_VERSION}/dist/js-yaml.js"; \
49-
wget -O /opt/js-yaml/package.json "https://github.com/nodeca/js-yaml/raw/${JSYAML_VERSION}/package.json"; \
50-
ln -s /opt/js-yaml/js-yaml.js /js-yaml.js; \
51-
# TODO some sort of download verification here
49+
wget -O /opt/js-yaml/js-yaml.tgz https://registry.npmjs.org/js-yaml/-/js-yaml-${JSYAML_VERSION}.tgz; \
50+
echo "$JSYAML_CHECKSUM */opt/js-yaml/js-yaml.tgz" | sha256sum -c -; \
51+
tar -xz --strip-components=1 -f /opt/js-yaml/js-yaml.tgz -C /opt/js-yaml package/dist/js-yaml.js package/package.json; \
52+
rm /opt/js-yaml/js-yaml.tgz; \
53+
ln -s /opt/js-yaml/dist/js-yaml.js /js-yaml.js; \
5254
\
5355
# download/install MongoDB PGP keys
5456
export GNUPGHOME="$(mktemp -d)"; \

0 commit comments

Comments
 (0)