mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-03-30 08:05:34 +00:00
Add security hint to secrets configuration (#574)
`'Please be careful with this option as a bad actor can submit a malicious pull request that exposes your secrets.'`
This commit is contained in:
parent
581f0ecba9
commit
db2fbc699a
3 changed files with 28 additions and 2 deletions
|
@ -4,6 +4,7 @@
|
||||||
:key="option.value"
|
:key="option.value"
|
||||||
:model-value="innerValue.includes(option.value)"
|
:model-value="innerValue.includes(option.value)"
|
||||||
:label="option.text"
|
:label="option.text"
|
||||||
|
:description="option.description"
|
||||||
class="mb-2"
|
class="mb-2"
|
||||||
@update:model-value="clickOption(option)"
|
@update:model-value="clickOption(option)"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
|
v-if="lines === 1"
|
||||||
v-model="innerValue"
|
v-model="innerValue"
|
||||||
class="
|
class="
|
||||||
w-full
|
w-full
|
||||||
|
@ -24,6 +25,20 @@
|
||||||
:type="type"
|
:type="type"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
/>
|
/>
|
||||||
|
<textarea
|
||||||
|
v-else
|
||||||
|
v-model="innerValue"
|
||||||
|
class="
|
||||||
|
w-full
|
||||||
|
bg-transparent
|
||||||
|
text-gray-600
|
||||||
|
placeholder-gray-400
|
||||||
|
focus:outline-none focus:border-blue-400
|
||||||
|
dark:placeholder-gray-600 dark:text-gray-500
|
||||||
|
"
|
||||||
|
:placeholder="placeholder"
|
||||||
|
:rows="lines"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -50,6 +65,11 @@ export default defineComponent({
|
||||||
type: String,
|
type: String,
|
||||||
default: 'text',
|
default: 'text',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
lines: {
|
||||||
|
type: Number,
|
||||||
|
default: 1,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
emits: {
|
emits: {
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
</InputField>
|
</InputField>
|
||||||
|
|
||||||
<InputField label="Value">
|
<InputField label="Value">
|
||||||
<TextField v-model="selectedSecret.value" placeholder="Value" required />
|
<TextField v-model="selectedSecret.value" placeholder="Value" :lines="5" required />
|
||||||
</InputField>
|
</InputField>
|
||||||
|
|
||||||
<InputField label="Available at following events">
|
<InputField label="Available at following events">
|
||||||
|
@ -87,7 +87,12 @@ const emptySecret = {
|
||||||
const secretEventsOptions: CheckboxOption[] = [
|
const secretEventsOptions: CheckboxOption[] = [
|
||||||
{ value: WebhookEvents.Push, text: 'Push' },
|
{ value: WebhookEvents.Push, text: 'Push' },
|
||||||
{ value: WebhookEvents.Tag, text: 'Tag' },
|
{ value: WebhookEvents.Tag, text: 'Tag' },
|
||||||
{ value: WebhookEvents.PullRequest, text: 'Pull Request' },
|
{
|
||||||
|
value: WebhookEvents.PullRequest,
|
||||||
|
text: 'Pull Request',
|
||||||
|
description:
|
||||||
|
'Please be careful with this option as a bad actor can submit a malicious pull request that exposes your secrets.',
|
||||||
|
},
|
||||||
{ value: WebhookEvents.Deploy, text: 'Deploy' },
|
{ value: WebhookEvents.Deploy, text: 'Deploy' },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue