From 50f6deadc28040fee7cc275db996de44a56c4985 Mon Sep 17 00:00:00 2001 From: ErnestG4 Date: Wed, 28 Sep 2016 18:10:59 -0700 Subject: [PATCH 1/4] Add Clair webhook notification section w/ anchor Quay.io references `http://docs.quay.io/guides/notifications.html#webhook_vulnerability_found` on the page `https://quay.io/repository/will_garrison/repotest/create-notification`. However, this anchor and section do not yet exist. This PR is to add the relevant section with information on the form and use of Clair webhooks. Please revise as needed. --- guides/notifications.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/guides/notifications.md b/guides/notifications.md index a601933..64ed45a 100644 --- a/guides/notifications.md +++ b/guides/notifications.md @@ -218,6 +218,25 @@ A Dockerfile build has failed } ``` +#### Vulnerability Found + + +Clair has discovered a new vulnerability + + + +Note: Clair webhook notifications report the UUID of the affected build. Use the API to analyze notifications for the build. + +```json +{ + "Notification": { + "Name": "6e4ad270-4957-4242-b5ad-dad851379573" + } +} +``` + + + ### Notification Actions #### Quay.io Notification From 246883bbfd2e1fa6bc87193735d907dfa7c02cb4 Mon Sep 17 00:00:00 2001 From: ErnestG4 Date: Wed, 28 Sep 2016 18:15:01 -0700 Subject: [PATCH 2/4] Fixed swagger link in the API Forgot the http:// on the link, so it was referring to a non-existent page. --- guides/notifications.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/notifications.md b/guides/notifications.md index 64ed45a..13c32b4 100644 --- a/guides/notifications.md +++ b/guides/notifications.md @@ -225,7 +225,7 @@ Clair has discovered a new vulnerability -Note: Clair webhook notifications report the UUID of the affected build. Use the API to analyze notifications for the build. +Note: Clair webhook notifications report the UUID of the affected build. Use the API to analyze notifications for the build. ```json { From 7a36a2181e404737d26f65ce260e2d72d478877f Mon Sep 17 00:00:00 2001 From: ErnestG4 Date: Thu, 29 Sep 2016 11:55:11 -0700 Subject: [PATCH 3/4] Replace json and subheading. I was conflating Clair webhooks with Quay vulnerabilty webhoks. As per advice on this PR I have updated the subheading to reflect "Quay Security Scanner" and corrected the expected output. --- guides/notifications.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/guides/notifications.md b/guides/notifications.md index 13c32b4..1ce9bce 100644 --- a/guides/notifications.md +++ b/guides/notifications.md @@ -221,16 +221,20 @@ A Dockerfile build has failed #### Vulnerability Found -Clair has discovered a new vulnerability +Quay Security Scanner has discovered a new vulnerability or an existing vulnerability was updated to a higher severity -Note: Clair webhook notifications report the UUID of the affected build. Use the API to analyze notifications for the build. - ```json { - "Notification": { - "Name": "6e4ad270-4957-4242-b5ad-dad851379573" + "tags": ["latest", "prod"], + "image": "the-image-id", + "vulnerability": { + "id": "CVE-1234-ID", + "description": "Heartbleed 2: Coronary Boogaloo", + "link": "http://link/to/vuln/info", + "priority": "Critical", + "has_fix": true } } ``` From 7a5e18feaa4ce8a2497f90103608e1831af7a0ca Mon Sep 17 00:00:00 2001 From: ErnestG4 Date: Thu, 29 Sep 2016 13:09:38 -0700 Subject: [PATCH 4/4] Add periods to notification descriptions & notes. Notification descriptions beneath each heading were full sentences with no periods. Added periods to each of them, and a few sentences lacking periods in the "Notification Actions" section. --- guides/notifications.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/guides/notifications.md b/guides/notifications.md index 1ce9bce..ad0cbea 100644 --- a/guides/notifications.md +++ b/guides/notifications.md @@ -12,7 +12,7 @@ Note: adding notifications requires **repository admin permission**. #### Repository Push -A successful push of one or more images was made to the repository +A successful push of one or more images was made to the repository. @@ -36,7 +36,7 @@ A successful push of one or more images was made to the repository #### Dockerfile Build Queued -A Dockerfile build has been queued into the build system +A Dockerfile build has been queued into the build system. @@ -82,7 +82,7 @@ A Dockerfile build has been queued into the build system #### Dockerfile Build Started -A Dockerfile build has been started by the build system +A Dockerfile build has been started by the build system. @@ -127,9 +127,9 @@ A Dockerfile build has been started by the build system #### Dockerfile Build Successfully Completed -A Dockerfile build has been successfully completed by the build system +A Dockerfile build has been successfully completed by the build system. -Note: This event will occur **simultaneously** with a _Repository Push_ event for the built image(s) +Note: This event will occur **simultaneously** with a _Repository Push_ event for the built image(s). @@ -174,7 +174,7 @@ Note: This event will occur **simultaneously** with a Dockerfile Build Failed -A Dockerfile build has failed +A Dockerfile build has failed. @@ -221,7 +221,7 @@ A Dockerfile build has failed #### Vulnerability Found -Quay Security Scanner has discovered a new vulnerability or an existing vulnerability was updated to a higher severity +Quay Security Scanner has discovered a new vulnerability or an existing vulnerability was updated to a higher severity. @@ -255,7 +255,7 @@ Quay.io Notifications can be setup to be sent to a Webhook POST