You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 899a0c1
Browse filesBrowse the repository at this point in the historyBrowse files
Change, withdraw or resubmit your own exception, and find one by id
The person who asked for an exception can now change its reason, expiry,
ticket or kind from the finding page, and withdraw it while it still waits.
A rejected or withdrawn one shows the approver's note and an Update and
resubmit button, which sends it back for approval with the old decision
cleared. An approved one cannot be changed on the screen; an administrator
revokes it. Nobody else can change or withdraw a request that is not theirs,
administrators included: it answers 404.
The Exceptions page shows each exception's id (E77), who approved or rejected
it and their note, and Change or Update and resubmit and Withdraw buttons on
your own rows. Its search takes an exception id: 77 matches the exception or
the finding, E77 or "exception 77" only the exception, #77 only the finding.
In the token API, GET /exceptions takes id, one exception number or up to 500
separated by commas, and vuln_id, the finding's GCR id. PATCH on a rejected
or withdrawn exception now resubmits it instead of answering 409. The API
reference, OpenAPI and Postman files, the Python and bash samples and the
changelog cover it.
<thclass="nowrap" title="The finding number, and the exception id under it">#</th><th>Status</th><th>Finding</th><th>Why</th><th>Asked by</th><th></th></tr></thead>
95
95
<tbody>
96
96
{% for w in rows %}
97
97
{% set f = findings.get(w.finding_id) %}
@@ -107,8 +107,9 @@
107
107
data-state="{{ w.status.value }}"
108
108
{{ 'disabled' if not can_act }}></td>
109
109
{% endif %}
110
-
<tdclass="nowrap mono"><ahref="{{ base }}/findings/{{ w.finding_id }}"
{% if w.decided_by %}<spanclass="sub">decided by {{ w.decided_by }}</span>{% endif %}
147
+
{% if w.decided_by %}<spanclass="sub">{{ w.status.value if w.status.value in ('approved', 'rejected') else 'decided' }} by {{ w.decided_by }}</span>{% endif %}
148
+
{% if w.decision_note %}<spanclass="sub" style="white-space:normal;max-width:40ch">{{ w.decision_note }}</span>{% endif %}
147
149
</td>
148
150
<tdclass="nowrap">
149
151
{% if can_approve and w.status.value == 'requested' %}
@@ -165,6 +167,22 @@
165
167
<buttonclass="btn sm danger" type="submit">Revoke</button>
166
168
</form>
167
169
{% endif %}
170
+
{# The person who asked: change it until it is approved, and
171
+
withdraw it while it still waits. The form is on the finding. #}
172
+
{% if w.status.value != 'approved'
173
+
and (w.requested_by or '') | lower == (user.username or '') | lower %}
174
+
<aclass="btn sm{{ ' primary' if w.status.value == 'rejected' }}"
175
+
href="{{ base }}/findings/{{ w.finding_id }}#exception"
176
+
title="Change the reason, expiry or ticket">{{ 'Change' if w.status.value == 'requested' else 'Update and resubmit' }}</a>
177
+
{% if w.status.value == 'requested' %}
178
+
<formmethod="post" action="{{ base }}/waivers/{{ w.id }}/withdraw"
179
+
style="display:inline"
180
+
data-confirm="Withdraw this request? You can ask again later.">
0 commit comments