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

update to latest release #1451

Open
wants to merge 10,000 commits into
base: workers
Choose a base branch
from
Open

update to latest release #1451

wants to merge 10,000 commits into from

Conversation

npenin
Copy link
Owner

@npenin npenin commented Oct 2, 2024

No description provided.

Copy link

gitguardian bot commented Oct 2, 2024

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
Once a secret has been leaked into a git repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

catch (result)
{
if (typeof result !== 'undefined' && step.outputAs)
results[job.name][step.outputAs] = result

Check warning

Code scanning / CodeQL

Prototype-polluting assignment Medium

This assignment may alter Object.prototype if a malicious '__proto__' string is injected from
library input
.

Copilot Autofix AI about 1 month ago

To fix the prototype pollution issue, we should ensure that the keys used in the results object cannot be __proto__, constructor, or prototype. This can be achieved by either using a Map object or by explicitly checking and rejecting these keys.

The best way to fix this without changing existing functionality is to add a check to reject these keys. This approach is straightforward and does not require significant changes to the existing code structure.

Suggested changeset 1
packages/automate/src/index.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/packages/automate/src/index.ts b/packages/automate/src/index.ts
--- a/packages/automate/src/index.ts
+++ b/packages/automate/src/index.ts
@@ -309,2 +309,5 @@
         let previousStepName: string = name + '#prerequisites';
+        if (job.name === '__proto__' || job.name === 'constructor' || job.name === 'prototype') {
+            throw new Error('Invalid job name: ' + job.name);
+        }
         results[job.name] = {};
EOF
@@ -309,2 +309,5 @@
let previousStepName: string = name + '#prerequisites';
if (job.name === '__proto__' || job.name === 'constructor' || job.name === 'prototype') {
throw new Error('Invalid job name: ' + job.name);
}
results[job.name] = {};
Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Copy link

sonarcloud bot commented Nov 28, 2024

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.

1 participant