GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add support for `actions` language by dbartol · Pull Request #2572 · github/codeql-action

Conversation

@dbartol

@dbartol dbartol commented Nov 1, 2024

Copy link
Copy Markdown

This PR adds support for the new actions CodeQL language, which will be part of the upcoming 2.19.3 release of the CodeQL bundle. In addition to adding actions to the list of supported languages, this PR also fixes a couple of issues I encountered while testing the new language:

The CODEQL_ACTION_EXTRA_OPTIONS environment variable, used for setting additional CLI options, now supports YAML, rather than just JSON. This makes it easier to specify complex options in a workflow file without complicated escaping.

I added support for the kind property for pack registries, to allow downloading packs from GitHub repo-based registries, in addition to the existing Docker-based registries.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Dave Bartolomeo added 4 commits October 18, 2024 17:20
Dave Bartolomeo
Add actions language
e1763c0
Dave Bartolomeo
Handle kind property in registries
6682b14
Dave Bartolomeo
Support YAML in CODEQL_ACTION_EXTRA_OPTIONS
7e9defd
Dave Bartolomeo
Merge remote-tracking branch 'origin/main' into dbartol/actions-analysis
2a3ca27
@dbartol
dbartol requested a review from a team as a code owner November 1, 2024 14:10
Dave Bartolomeo
Add unit test for YAML support in CODEQL_ACTION_EXTRA_OPTIONS
4e764dc
@dbartol
dbartol requested review from aeisenberg and henrymercer November 1, 2024 15:39
henrymercer
henrymercer previously approved these changes Nov 1, 2024
View reviewed changes
Comment thread src/config-utils.ts
Comment on lines +68 to +69
// Kind of registry, either "github" or "docker". Default is "docker".
kind?: "github" | "docker";

@henrymercer henrymercer Nov 1, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I wonder if folks might confuse "docker" with docker hub when I think we're talking about GHCR (or I guess any OCI container registry?). We could say something like "repository" / "container"? I'm not sure what's best.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dbartol dbartol Nov 1, 2024

Copy link
Copy Markdown
Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The docker value is already baked into the CLI. We could consider changing it there (adding ghcr or whatever as an alias), but I don't think it's worth the effort. docker is the default, so nobody ever has to actually specify it.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

henrymercer reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@aeisenberg aeisenberg Nov 1, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Maybe just adding a comment to say that the only docker registry we support is GHCR. This is public code and I wouldn't want to give any false impressions.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dbartol dbartol Nov 1, 2024

Copy link
Copy Markdown
Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Added a comment

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/languages.ts
@@ -1,5 +1,6 @@
// All the languages supported by CodeQL
export enum Language {
actions = "actions",

@henrymercer henrymercer Nov 1, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thought: is it worth adding a warning in the init Action when using this language that actions isn't officially supported yet?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dbartol dbartol Nov 1, 2024

Copy link
Copy Markdown
Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

They'll already have to enable the experimental language support in the CLI by setting CODEQL_ENABLE_EXPERIMENTAL_FEATURES=true, so I think they'll already know it's not officially supported yet.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

henrymercer reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
aeisenberg
aeisenberg reviewed Nov 1, 2024
View reviewed changes
Comment thread src/config-utils.ts
Comment on lines +68 to +69
// Kind of registry, either "github" or "docker". Default is "docker".
kind?: "github" | "docker";

@aeisenberg aeisenberg Nov 1, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Maybe just adding a comment to say that the only docker registry we support is GHCR. This is public code and I wouldn't want to give any false impressions.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/config-utils.ts
// List of globs that determine which packs are associated with this registry.
packages: string[] | string;

// Kind of registry, either "github" or "docker". Default is "docker".

@aeisenberg aeisenberg Nov 1, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Suggested change
// Kind of registry, either "github" or "docker". Default is "docker".
// Kind of registry, either "github" or "docker". Default is "docker".
// The only docker registry that codeql supports is the GitHub Container Registry.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dbartol dbartol Nov 1, 2024

Copy link
Copy Markdown
Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Sorry, didn't see this suggestion until I'd already added a different comment.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@aeisenberg aeisenberg Nov 1, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I think what you have now is fine. Thanks for updating.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Dave Bartolomeo
Add comment about registry kinds
ca91b63
@dbartol
dbartol dismissed henrymercer’s stale review via ca91b63 November 1, 2024 18:00
aeisenberg
aeisenberg approved these changes Nov 1, 2024
View reviewed changes
@dbartol
dbartol enabled auto-merge November 1, 2024 18:06
@dbartol
dbartol merged commit cbe1897 into main Nov 1, 2024
@dbartol
dbartol deleted the dbartol/actions-analysis branch November 1, 2024 18:16
This was referenced Nov 8, 2024
Merge main into releases/v3 #2585
Merged
Merge releases/v3 into releases/v2 #2587
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@aeisenberg aeisenberg aeisenberg approved these changes
@henrymercer henrymercer henrymercer left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@dbartol @aeisenberg @henrymercer
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.