From 6d72b58b02639148eccb9d75973f5f882731a884 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Tue, 7 Jan 2020 16:01:27 -0500 Subject: [PATCH 1/7] pure whitespace changes --- .../scripts/ScriptApproval/index.jelly | 29 ++++++++++++++----- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly b/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly index 6a9ed46b9..ce0cc251b 100644 --- a/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly +++ b/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly @@ -87,8 +87,11 @@ THE SOFTWARE. /* Create a list like:

- / - + + / + ${pcp.hash} (${pcp.path})

*/ @@ -126,7 +129,8 @@ THE SOFTWARE. /* Create a list like:

- + ${acp.hash} (${acp.path})

*/ @@ -191,7 +195,12 @@ THE SOFTWARE.

- / ${ps.language.displayName} script + + / + + ${ps.language.displayName} script :

@@ -214,11 +223,17 @@ THE SOFTWARE.

- / + + / - / + + / - signature + + signature : ${s.signature} From 3f2c4b71295b85673a294a6886aee1a314cfa87f Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Tue, 7 Jan 2020 16:02:06 -0500 Subject: [PATCH 2/7] Rename approvedClasspathEntries-list --- .../scripts/ScriptApproval/index.jelly | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly b/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly index ce0cc251b..ea56cf27b 100644 --- a/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly +++ b/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly @@ -120,12 +120,12 @@ THE SOFTWARE. function renderApprovedClasspathEntries(approvedClasspathEntries) { if (approvedClasspathEntries.length == 0) { $('approvedClasspathEntries-none').show(); - $('approvedClasspathEntries').childElements().each(function(e){e.remove()}); - $('approvedClasspathEntries').hide(); + $('approvedClasspathEntries-list').childElements().each(function(e){e.remove()}); + $('approvedClasspathEntries-list').hide(); $('approvedClasspathEntries-clear').hide(); } else { $('approvedClasspathEntries-none').hide(); - $('approvedClasspathEntries').childElements().each(function(e){e.remove()}); + $('approvedClasspathEntries-list').childElements().each(function(e){e.remove()}); /* Create a list like:

@@ -146,9 +146,9 @@ THE SOFTWARE. block.insert(deleteButton); block.insert("<code title='" + e.hash + "'>" + e.path + "</code>"); - $('approvedClasspathEntries').insert(block); + $('approvedClasspathEntries-list').insert(block); }); - $('approvedClasspathEntries').show(); + $('approvedClasspathEntries-list').show(); $('approvedClasspathEntries-clear').show(); } } @@ -278,7 +278,7 @@ THE SOFTWARE.

No approved classpath entries.

-
+

You can also remove all previous classpath entry approvals: From e6ade29837b8c612d6aba3454f3ae3cb1919ccfe Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Tue, 7 Jan 2020 16:04:23 -0500 Subject: [PATCH 3/7] Add p tags --- .../scripts/ScriptApproval/index.jelly | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly b/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly index ea56cf27b..079fabf6b 100644 --- a/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly +++ b/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly @@ -203,7 +203,13 @@ THE SOFTWARE. ${ps.language.displayName} script :

- +

+ +

@@ -236,10 +242,12 @@ THE SOFTWARE. signature : ${s.signature} - - Approving this signature may introduce a security vulnerability! You are advised to deny it. -

+ +

+ Approving this signature may introduce a security vulnerability! You are advised to deny it. +

+
@@ -255,9 +263,11 @@ THE SOFTWARE.

Signatures already approved which may have introduced a security vulnerability (recommend clearing):

- +

+ +

You can also remove all previous signature approvals: From 6e21bc7f7e37975ec7949f4b72b21afa10f1ed08 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Tue, 7 Jan 2020 16:05:12 -0500 Subject: [PATCH 4/7] Use h4 tags for sections --- .../scripts/ScriptApproval/index.jelly | 35 +++++++++++++------ 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly b/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly index 079fabf6b..99f76f7d1 100644 --- a/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly +++ b/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly @@ -122,6 +122,7 @@ THE SOFTWARE. $('approvedClasspathEntries-none').show(); $('approvedClasspathEntries-list').childElements().each(function(e){e.remove()}); $('approvedClasspathEntries-list').hide(); + $('approved-classpath-entries-clear').hide(); $('approvedClasspathEntries-clear').hide(); } else { $('approvedClasspathEntries-none').hide(); @@ -149,6 +150,7 @@ THE SOFTWARE. $('approvedClasspathEntries-list').insert(block); }); $('approvedClasspathEntries-list').show(); + $('approved-classpath-entries-clear').show(); $('approvedClasspathEntries-clear').show(); } } @@ -214,8 +216,10 @@ THE SOFTWARE. -

+

You can also remove all previous script approvals: +

+


@@ -252,30 +256,36 @@ THE SOFTWARE. -

Signatures already approved:

+

Signatures already approved:

-

Signatures already approved assuming permission check:

+

Signatures already approved assuming permission check:

-

Signatures already approved which may have introduced a security vulnerability (recommend clearing):

+

Signatures already approved which may have introduced a security vulnerability (recommend clearing):

-

+

You can also remove all previous signature approvals: - +

+

+

- Or you can just remove the dangerous ones: - +

Or you can just remove the dangerous ones:

+

+ +


@@ -284,15 +294,18 @@ THE SOFTWARE.

Classpath entries pending approval. (Beware of remote URLs, workspace files, or anything else that might change without your notice.)
-

Classpath entries already approved:

+

Classpath entries already approved:

No approved classpath entries.

-

+

You can also remove all previous classpath entry approvals: - +

+

+

From d5d5bc2621058825a92ff84c3098795ea1150294 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Tue, 7 Jan 2020 16:06:31 -0500 Subject: [PATCH 5/7] Add h3 tags for sections --- .../scriptsecurity/scripts/ScriptApproval/index.jelly | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly b/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly index 99f76f7d1..f382cf5fa 100644 --- a/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly +++ b/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly @@ -187,6 +187,9 @@ THE SOFTWARE. }); }); +

+ Script approvals +

@@ -223,6 +226,7 @@ THE SOFTWARE.


+

Signature Approvals

@@ -288,6 +292,7 @@ THE SOFTWARE.


+

Classpath Approvals

No pending classpath entry approvals.

From 6aa96537fdd589e76180df1b9a867708fff0006b Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Tue, 7 Jan 2020 16:06:38 -0500 Subject: [PATCH 6/7] Add h2 heading --- .../plugins/scriptsecurity/scripts/ScriptApproval/index.jelly | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly b/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly index f382cf5fa..b8013047a 100644 --- a/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly +++ b/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly @@ -187,6 +187,9 @@ THE SOFTWARE. }); }); +

+ In-process Script Approval +

Script approvals

From 8bb3e7d2e6af1307d506678d73fbe7fdd28a9a33 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Tue, 7 Jan 2020 16:13:02 -0500 Subject: [PATCH 7/7] Add none value --- .../scripts/ScriptApproval/index.jelly | 34 +++++++++++++++---- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly b/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly index b8013047a..c02b8335f 100644 --- a/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly +++ b/src/main/resources/org/jenkinsci/plugins/scriptsecurity/scripts/ScriptApproval/index.jelly @@ -264,13 +264,35 @@ THE SOFTWARE.

Signatures already approved:

- + + +

+ None +

+
+ +

+ +

+
+

Signatures already approved assuming permission check:

- + + +

+ None +

+
+ +

+ +

+
+

Signatures already approved which may have introduced a security vulnerability (recommend clearing):