Package jenkins.branch
Class UntrustedBranchProperty
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<BranchProperty>
-
- jenkins.branch.BranchProperty
-
- jenkins.branch.UntrustedBranchProperty
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<BranchProperty>
public class UntrustedBranchProperty extends BranchProperty
Indicates that the branch contains code changes from authors who do not otherwise have the write access to the repository.Such code can contain malicious changes, so this flag serves as a signal to allow other Jenkins to set up the build isolation to protect the build infrastructure.
Some examples of where the trusted vs non-trusted distinction becomes important:
- Github pull requests should be non-trusted as they can be created by any user
- A Subversion branching structure such as
trunk, branches, tags, sandbox
would probably havetrunk, branches, tags
as trusted andsandbox
as untrusted where the Subversion permissions give any authenticated user write access tosandbox
but allow the project team to commit to all four locations
- Author:
- Stephen Connolly, Kohsuke Kawaguchi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UntrustedBranchProperty.DescriptorImpl
OurDescriptor
.-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description UntrustedBranchProperty(String[] publisherWhitelist)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>
getPublisherWhitelist()
<P extends Job<P,B>,B extends Run<P,B>>
JobDecorator<P,B>jobDecorator(Class<P> jobType)
Returns aJobDecorator
for the specific job type.-
Methods inherited from class jenkins.branch.BranchProperty
asArrayList, decorator, decorator, getDescriptor
-
-
-
-
Constructor Detail
-
UntrustedBranchProperty
@DataBoundConstructor public UntrustedBranchProperty(String[] publisherWhitelist)
-
-
Method Detail
-
jobDecorator
public <P extends Job<P,B>,B extends Run<P,B>> JobDecorator<P,B> jobDecorator(Class<P> jobType)
Description copied from class:BranchProperty
Returns aJobDecorator
for the specific job type.- Overrides:
jobDecorator
in classBranchProperty
- Type Parameters:
P
- the type of job.B
- the type of run of the job.- Parameters:
jobType
- the job class.- Returns:
- a
JobDecorator
ornull
if none appropriate to this type of job.
-
-