Improving emails for security updates [Papercut]

From time to time, I receive very useful emails on security updates for my snaps. The content very well details the issue and suggests how rebuilding the snap is sufficient to get the security update.

What I would add is a link to the page of the store where I can rebuild my snap. This is a little touch that could really improve the user experience in my opinion.

3 Likes

And given the stability of such security fix, it could be useful to also have something, like a checkbox, to automatically release after the build succeeds, so you donā€™t have to go back to snapcraft.io some 30 minutes later to just release. :blush:

2 Likes

For a comparison with a similar system, you can see here a dependabot email I recently received, and you can see in the bottom, how it provided a link to the patch where I could just go, review and merge. Iā€™d like something similar for snaps.

Bumps lodash from 4.17.10 to 4.17.15. This update includes security fixes.

Vulnerabilities fixed
Sourced from The GitHub Security Advisory Database.

Critical severity vulnerability that affects lodash, lodash-es, lodash-amd, lodash.template, lodash.merge, lodash.mergewith, and lodash.defaultsdeep Affected versions of lodash are vulnerable to Prototype Pollution. The function defaultsDeep could be tricked into adding or modifying properties of Object.prototype using a constructor payload.

Affected versions: < 4.17.12

Sourced from The GitHub Security Advisory Database.

Moderate severity vulnerability that affects lodash lodash prior to 4.7.11 is affected by: CWE-400: Uncontrolled Resource Consumption. The impact is: Denial of service. The component is: Date handler. The attack vector is: Attacker provides very long strings, which the library attempts to match using a regular expression. The fixed version is: 4.7.11.

Affected versions: < 4.17.11

Sourced from The GitHub Security Advisory Database.

High severity vulnerability that affects lodash, lodash-es, lodash-amd, lodash.template, lodash.merge, lodash.mergewith, and lodash.defaultsdeep Affected versions of lodash are vulnerable to Prototype Pollution. The function defaultsDeep could be tricked into adding or modifying properties of Object.prototype using a constructor payload.

Affected versions: < 4.17.13

Sourced from The Node Security Working Group.

Denial of Service Prototype pollution attack (lodash / constructor.prototype)

Affected versions: <4.17.11

Sourced from The GitHub Security Advisory Database.

Low severity vulnerability that affects lodash A prototype pollution vulnerability was found in lodash <4.17.11 where the functions merge, mergeWith, and defaultsDeep can be tricked into adding or modifying properties of Object.prototype.

Affected versions: < 4.17.11

Commits
ddfd9b1 Bump to v4.17.15.
b185fce Rebuild lodash and docs.
be87d30 Bump to v4.17.14.
a6fe6b1 Rebuild lodash and docs.
e371828 Bump to v4.17.13.
357e899 Rebuild lodash and docs.
fd9a062 Bump to v4.17.12.
e77d681 Rebuild lodash and docs.
629d186 Update OpenJS references.
2406eac Fix minified build.
Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you donā€™t alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

Note: This repo was added to Dependabot recently, so youā€™ll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs weā€™ll remove that limit.

You can always request more updates by clicking Bump now in your Dependabot dashboard.

Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:

@dependabot rebase will rebase this PR
@dependabot recreate will recreate this PR, overwriting any edits that have been made to it
@dependabot merge will merge this PR after your CI passes on it
@dependabot squash and merge will squash and merge this PR after your CI passes on it
@dependabot cancel merge will cancel a previously requested merge and block automerging
@dependabot reopen will reopen this PR if it is closed
@dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
@dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
@dependabot use these labels will set the current labels as the default for future PRs for this repo and language
@dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
@dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
@dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
@dependabot badge me will comment on this PR with code to add a ā€œDependabot enabledā€ badge to your readme
Additionally, you can set the following in your Dependabot dashboard:

Update frequency (including time of day and day of week)
Pull request limits (per update run and/or open at any time)
Out-of-range updates (receive only lockfile updates, if desired)
Security updates (receive only security updates, if desired)
You can view, comment on, or merge this pull request online at:
https://github.com/fcole90/numjs/pull/12

Commit Summary
[Security] Bump lodash from 4.17.10 to 4.17.15
File Changes
M package-lock.json (6)
Patch Links:
https://github.com/fcole90/numjs/pull/12.patch
https://github.com/fcole90/numjs/pull/12.diff
ā€”
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

I would go one step further than this:
Iā€™d like a checkbox on the project to automagically rebuild the project if a security flaw is found.

3 Likes

@popey

I hope you can help with this question; is the system that generates these emails open source and available somewhere online?

Currently the notifications are generated via a cron job in the DC that is a simple script that drives the review-tools, so, ā€˜yesā€™. The long term goal is for these notifications to come from the snap store proper (cc @noise) which would allow for nice functionality like reporting, rebuilding, etc.

2 Likes

As @jdstrand notes, we are looking at doing the next step of store integration, hopefully soon, to allow for in-store visibility and options for build triggering.

2 Likes

Ok, so Iā€™m guessing snap-updates-available is what sends the emails?

Adding a link to the build-url in the email should be possible, I think. You can check the manifest if image-info.build_url contains /~build.snapcraft.io/ and if so, add a link to the email pointing to https://snapcraft.io/<name>/builds/. Does this make sense @jdstrand?

2 Likes

Yes. Iā€™ve added it to our TODO to investigate/implement for the review-tools.

3 Likes