-
Notifications
You must be signed in to change notification settings - Fork 309
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
Merge main into v1 #549
Merged
Merged
Merge main into v1 #549
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix wording in README
This commit changes the way the action determines if running in action or runner mode. There is now an environment variable that is set at the beginning of the process and elsewhere in the process, we can check to see if the variable is set.
Update the ql queries to account for change in how we look for runner Previously, we guarded blocks of code to be run by the runner or the action using if statements like this: ```js if (mode === "actions") ... ``` We are no longer doing this. And now, the `unguarded-action-lib.ql` query is out of date. This query checks that runner code does not unintentionally access actions-only methods in the libraries. With these changes, we now ensure that code scanning is happy.
Send version and mode to code scanning via user agent
We need to tag and mergeback if the tag does _not_ already exist.
This should have happened in a mergeback PR, but the workflow to generate this was broken.
The removeNPMAbsolutePaths check requires no newlines at the end of the file. This ensures that the version update mimics the behavior.
Fix the mergeback workflow
Hooks are new to commander v8. We can use hooks to ensure that `setMode` is called before every command is invoked.
Use commander preAction hook for setMode
…r-versions Update supported GitHub Enterprise Server versions.
Update unguarded-action-lib.ql to catch uses of actions-util.ts
This PR ensures environment variables are set before any invocation of the CLI. Here is a list of vars that are set: github/codeql-core#1124 (comment) This ensures the CLI knows the features and versions of the containing actions/runner. Additionally: - Fix the user agent so that it more closely aligns with user agent spec - Refactor environment variable initialization so that it all happens in one place and call. - Move Mode, getRequiredEnvParam, setMode, getMode out of actions-util and into util. actions-util is meant for utils only called by the action, not the runner. The `prepareLocalRunEnvironment()` method is most likely deprecated and should be removed. I originally added it because I had a way of working where I would run the action from my local machine to test out changes, but this was always a little flaky. So, I no longer use this way of working. I will probably remove it soon.
This is a functionality that never worked perfectly and hasn't been used for a while. This allows developers to run the action on their local machine, but the run was always flaky and never 100% mirrored what was happening on the actions runner.
Must access the env var directly in order to avoid recursive calls to `getRequiredEnvParam`.
Also, move `getTemporaryDirectory` back to `actions-util`.
Add environment variables to signal feature and version to the CLI
aeisenberg
approved these changes
Jun 7, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Merging 242fd82 into v1
Conductor for this PR is @chrisgavin
Contains the following pull requests:
--sarif-group-rules-by-pack
flag #546 - Add--sarif-group-rules-by-pack
flag (@edoardopirovano)Please review the following: