Email the requester when their access request is decided - #8291
Email the requester when their access request is decided#8291maxkpower wants to merge 11 commits into
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Re-reviewed at Code Review DetailsNo findings. Notes, not findings:
|
c48fbe2 to
145f87b
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## pam/PM-42817/mail-request-pending #8291 +/- ##
=====================================================================
+ Coverage 64.75% 64.77% +0.01%
=====================================================================
Files 2603 2605 +2
Lines 111994 112053 +59
Branches 10046 10054 +8
=====================================================================
+ Hits 72522 72581 +59
+ Misses 37038 37035 -3
- Partials 2434 2437 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
145f87b to
d8553a0
Compare
d8553a0 to
a5906d5
Compare
a5906d5 to
6fe42d1
Compare
Also trims the mail notification doc comments.
6fe42d1 to
caca1cd
Compare
…il-request-decided
…ided text template
| @@ -0,0 +1,19 @@ | |||
| {{#if Approved}}Your access request was approved | |||
|
|
|||
| An approver has approved your access request in {{{OrganizationName}}}. Your access has not started yet. Open the request and start it once the access window below opens. | |||
There was a problem hiding this comment.
Rendering unescaped input in handlebar/mustache template can lead to XSS attacks - high severity
Using {{{ }}} renders an unescaped string into the template. This means the developer is responsible for allowlisting all HTML strings that can be passed in.
Show fix
Remediation: Avoid {{{ }}} usage. Ignore this issue only if the HTML content you feed into it is static. Defend in depth against XSS attacks by using a strict CSP policy. If you must use HTML, sanitize it with a library such as DOMPurify.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
There was a problem hiding this comment.
@AikidoSec ignore: plain-text mail body, not HTML; triple braces are the repo convention for .text.hbs
There was a problem hiding this comment.
✅ Based on your feedback, we ignored this issue because of the following reason:
plain-text mail body, not HTML; triple braces are the repo convention for .text.hbs
|
|
||
| An approver has approved your access request in {{{OrganizationName}}}. Your access has not started yet. Open the request and start it once the access window below opens. | ||
|
|
||
| Approved access window: {{{WindowStart}}} - {{{WindowEnd}}} |
There was a problem hiding this comment.
Rendering unescaped input in handlebar/mustache template can lead to XSS attacks - high severity
Using {{{ }}} renders an unescaped string into the template. This means the developer is responsible for allowlisting all HTML strings that can be passed in.
Show fix
Remediation: Avoid {{{ }}} usage. Ignore this issue only if the HTML content you feed into it is static. Defend in depth against XSS attacks by using a strict CSP policy. If you must use HTML, sanitize it with a library such as DOMPurify.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
There was a problem hiding this comment.
@AikidoSec ignore: plain-text mail body, not HTML; triple braces are the repo convention for .text.hbs
There was a problem hiding this comment.
✅ Based on your feedback, we ignored this issue because of the following reason:
plain-text mail body, not HTML; triple braces are the repo convention for .text.hbs
|
|
||
| Approved access window: {{{WindowStart}}} - {{{WindowEnd}}} | ||
|
|
||
| Start access: {{{Url}}} |
There was a problem hiding this comment.
Rendering unescaped input in handlebar/mustache template can lead to XSS attacks - high severity
Using {{{ }}} renders an unescaped string into the template. This means the developer is responsible for allowlisting all HTML strings that can be passed in.
Show fix
Remediation: Avoid {{{ }}} usage. Ignore this issue only if the HTML content you feed into it is static. Defend in depth against XSS attacks by using a strict CSP policy. If you must use HTML, sanitize it with a library such as DOMPurify.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
There was a problem hiding this comment.
@AikidoSec ignore: plain-text mail body, not HTML; triple braces are the repo convention for .text.hbs
There was a problem hiding this comment.
✅ Based on your feedback, we ignored this issue because of the following reason:
plain-text mail body, not HTML; triple braces are the repo convention for .text.hbs
| Starting access is what grants it, and you cannot start it before the window above begins. If you do not start it before that window ends, the approval lapses and you will need to ask again. | ||
| {{else}}Your access request was denied | ||
|
|
||
| An approver has declined your access request in {{{OrganizationName}}}. No access was granted. |
There was a problem hiding this comment.
Rendering unescaped input in handlebar/mustache template can lead to XSS attacks - high severity
Using {{{ }}} renders an unescaped string into the template. This means the developer is responsible for allowlisting all HTML strings that can be passed in.
Show fix
Remediation: Avoid {{{ }}} usage. Ignore this issue only if the HTML content you feed into it is static. Defend in depth against XSS attacks by using a strict CSP policy. If you must use HTML, sanitize it with a library such as DOMPurify.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
There was a problem hiding this comment.
@AikidoSec ignore: plain-text mail body, not HTML; triple braces are the repo convention for .text.hbs
There was a problem hiding this comment.
✅ Based on your feedback, we ignored this issue because of the following reason:
plain-text mail body, not HTML; triple braces are the repo convention for .text.hbs
|
|
||
| An approver has declined your access request in {{{OrganizationName}}}. No access was granted. | ||
|
|
||
| Requested access window: {{{WindowStart}}} - {{{WindowEnd}}} |
There was a problem hiding this comment.
Rendering unescaped input in handlebar/mustache template can lead to XSS attacks - high severity
Using {{{ }}} renders an unescaped string into the template. This means the developer is responsible for allowlisting all HTML strings that can be passed in.
Show fix
Remediation: Avoid {{{ }}} usage. Ignore this issue only if the HTML content you feed into it is static. Defend in depth against XSS attacks by using a strict CSP policy. If you must use HTML, sanitize it with a library such as DOMPurify.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
There was a problem hiding this comment.
@AikidoSec ignore: plain-text mail body, not HTML; triple braces are the repo convention for .text.hbs
There was a problem hiding this comment.
✅ Based on your feedback, we ignored this issue because of the following reason:
plain-text mail body, not HTML; triple braces are the repo convention for .text.hbs
|
|
||
| Requested access window: {{{WindowStart}}} - {{{WindowEnd}}} | ||
|
|
||
| View the request: {{{Url}}} |
There was a problem hiding this comment.
Rendering unescaped input in handlebar/mustache template can lead to XSS attacks - high severity
Using {{{ }}} renders an unescaped string into the template. This means the developer is responsible for allowlisting all HTML strings that can be passed in.
Show fix
Remediation: Avoid {{{ }}} usage. Ignore this issue only if the HTML content you feed into it is static. Defend in depth against XSS attacks by using a strict CSP policy. If you must use HTML, sanitize it with a library such as DOMPurify.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
There was a problem hiding this comment.
@AikidoSec ignore: plain-text mail body, not HTML; triple braces are the repo convention for .text.hbs
There was a problem hiding this comment.
✅ Based on your feedback, we ignored this issue because of the following reason:
plain-text mail body, not HTML; triple braces are the repo convention for .text.hbs
…m/bitwarden/server into pam/PM-42817/mail-request-decided
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-42817
📔 Objective
Emails the requester when their pending access request is approved or denied. They are blocked on that answer and currently have nothing to watch but the web vault.
ActivateAccessRequestCommandis what mints the lease.Third of four in a stack on
pam/uat. Sits on the approver notification PR.📸 Screenshots