Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make WithScriptAllowlist look up instances of WithScriptDescriptor dynamically instead of registering allowed scripts directly #686

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dwnusbaum
Copy link
Member

@dwnusbaum dwnusbaum commented Jan 9, 2024

See jenkinsci/workflow-cps-plugin#538 (comment) and jenkinsci/workflow-cps-plugin#538 (comment).

I have not been able to reproduce the issue yet, so this is just a speculative change.

…namically instead of registering allowed scripts directly
Comment on lines +106 to +107
for (WithScriptDescriptor descriptor : ExtensionList.lookup(WithScriptDescriptor.class)) {
URL scriptResource = descriptor.getScriptResource();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be slower than before. I suspect it would be ok as-is, but jenkinsci/workflow-cps-plugin#829 will cache all of the allowlist responses, which should make performance a non-issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants