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

Provide a way to pass a whole configuration as parameter #1589

Closed
tgrall opened this issue Mar 18, 2023 · 1 comment
Closed

Provide a way to pass a whole configuration as parameter #1589

tgrall opened this issue Mar 18, 2023 · 1 comment
Assignees

Comments

@tgrall
Copy link
Contributor

tgrall commented Mar 18, 2023

Problem

As a user of GitHub CodeQL in Actions I would like to be able to pass some configuration when running my workflow, for example:

  • pass a query filter from or environment variable or input parameter

Today only a subset of the available configuration/parameters is available in the action.

Solution

Add a new parameter, for example called configuration that will take the same format as a config-file but can be used directly in the action.

The idea is to support the following examples:

  • Complete on configuration

    - uses: github/codeql-action/init@v2
      with:
        languages: ${{ matrix.language }}
        configuration: |
          disable-default-queries: true
          queries:
            - uses: security-extended
            - uses: security-and-quality
          query-filters:
            - include:
          tags: /cwe-020/
  • Actions Variable

    - uses: github/codeql-action/init@v2
      with:
        languages: ${{ matrix.language }}
        configuration: |
              ${{vars.CODEQL_CONF}}    
  • Input Parameter

      - uses: tgrall/codeql-action/init@query-filter
      with:
        languages: ${{ matrix.language }}
        configuration: |
          disable-default-queries: true
          queries:
            - uses: security-extended
            - uses: security-and-quality
          query-filters:
            - include:
                tags: /${{ github.event.inputs.codeql-include-tags }}/ 
@aeisenberg
Copy link
Contributor

This is now available.

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 a pull request may close this issue.

2 participants