Skip to content

Commits

Commits on Jun 4, 2021

  1. Copy the full SHA
    6cee818 View commit details

Commits on Jun 3, 2021

  1. Allow the codeql-action to run packages

    This commit adds a `packs` option to the codeql-config.yml file. Users
    can specify a list of ql packs to include in the analysis.
    
    For a single language analysis, the packs property looks like this:
    
    ```yaml
    packs:
      - pack-scope/pack-name1@1.2.3
      - pack-scope/pack-name2   # no explicit version means download the latest
    ```
    
    For multi-language analysis, you must key the packs block by lanaguage:
    
    ```yaml
    packs:
      cpp:
        - pack-scope/pack-name1@1.2.3
        - pack-scope/pack-name2
      java:
        - pack-scope/pack-name3@1.2.3
        - pack-scope/pack-name4
    ```
    
    This implementation adds a new analysis run (alongside custom and 
    builtin runs). The unit tests indicate that the correct commands are
    being run, but I have not actually tried this with a real CLI.
    
    Also, convert `instanceof Array` to `Array.isArray` since that is
    sightly better in some situations. See:
    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#instanceof_vs_isarray
    Andrew Eisenberg committed Jun 3, 2021
    Copy the full SHA
    86a804f View commit details
  2. Cleaning up comments around env vars

    Also, move `getTemporaryDirectory` back to `actions-util`.
    Andrew Eisenberg committed Jun 3, 2021
    Copy the full SHA
    f60ef17 View commit details

Commits on Jun 2, 2021

  1. Fix Unguarded actions library use code scanning error

    Must access the env var directly in order to avoid recursive calls to 
    `getRequiredEnvParam`.
    Andrew Eisenberg committed Jun 2, 2021
    Copy the full SHA
    cc0733f View commit details
  2. Merge branch 'main' into aeisenberg/env-vars

    Andrew Eisenberg committed Jun 2, 2021
    Copy the full SHA
    082575f View commit details
  3. Remove local environment running

    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.
    Andrew Eisenberg committed Jun 2, 2021
    Copy the full SHA
    2c2ebdc View commit details
  4. Add environment variables to signal feature and version to the CLI

    This PR ensures environment variables are set before any invocation of
    the CLI.  Here is a list of vars that are set:
    
    https://github.com/github/codeql-coreql-team/issues/1124#issuecomment-852463521
    
    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.
    Andrew Eisenberg committed Jun 2, 2021
    Copy the full SHA
    3708898 View commit details
  5. Merge branch 'main' into update-supported-enterprise-server-versions

    Andrew Eisenberg authored and GitHub committed Jun 2, 2021
    Copy the full SHA
    739e14d View commit details
  6. Copy the full SHA
    2fee124 View commit details

Commits on Jun 1, 2021

  1. Use commander preAction hook for setMode

    Hooks are new to commander v8. We can use hooks to ensure that `setMode`
    is called before every command is invoked.
    Andrew Eisenberg committed Jun 1, 2021
    Copy the full SHA
    539d968 View commit details

Commits on May 31, 2021

  1. Use the version from package.json in the runner

    Andrew Eisenberg committed May 31, 2021
    Copy the full SHA
    1a4cdd3 View commit details
  2. Send the version and mode with the user agent

    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.
    Andrew Eisenberg committed May 31, 2021
    Copy the full SHA
    4758879 View commit details

Commits on May 28, 2021

  1. Analyze: Log analysis summaries for custom queries

    Henry Mercer committed May 28, 2021
    Copy the full SHA
    2338fe5 View commit details

Commits on May 24, 2021

  1. Address comments

    Arthur Baars committed May 24, 2021
    Copy the full SHA
    44c6b33 View commit details

Commits on May 23, 2021

  1. Check available languages

    Arthur Baars committed May 23, 2021
    Copy the full SHA
    4f51b8c View commit details

Commits on May 21, 2021

  1. Fix unit test

    Arthur Baars committed May 21, 2021
    Copy the full SHA
    9170009 View commit details
  2. Add Ruby as a possible language

    Arthur Baars committed May 21, 2021
    Copy the full SHA
    c3633dc View commit details
  3. Merge branch 'main' into aibaars-additional-packs

    Andrew Eisenberg authored and GitHub committed May 21, 2021
    Copy the full SHA
    c3e0f88 View commit details
  4. Fix tests

    Arthur Baars committed May 21, 2021
    Copy the full SHA
    6a14acc View commit details
  5. Check queries in initConfig

    Arthur Baars committed May 21, 2021
    Copy the full SHA
    84bec4d View commit details
  6. Remove superfluous if

    Arthur Baars committed May 21, 2021
    Copy the full SHA
    9aca271 View commit details
  7. Ensure queries[language] objects are initialized

    Arthur Baars committed May 21, 2021
    Copy the full SHA
    ec011dd View commit details
  8. Use --additional-packs instead of --search-path

    Arthur Baars committed May 21, 2021
    Copy the full SHA
    69cc355 View commit details

Commits on May 20, 2021

  1. Decode CodeQL stdout as UTF-8

    Aditya Sharad committed May 20, 2021
    Copy the full SHA
    512d467 View commit details
  2. Group log messages while uploading results

    Aditya Sharad committed May 20, 2021
    Copy the full SHA
    031ec87 View commit details
  3. Analyze: Log the analysis summary in its own group

    Fix grouping of the analysis logs, so that custom query logs also get grouped.
    Capture the stdout of codeql database analyze, which contains the analysis summary
    from summary and diagnostic queries.
    Log this output in its own group, along with the baseline computed in the Action.
    Aditya Sharad committed May 20, 2021
    Copy the full SHA
    19fe63f View commit details

Commits on May 17, 2021

  1. Add configuration option to set CodeQL DB location

    Edoardo Pirovano authored and Edoardo Pirovano committed May 17, 2021
    Copy the full SHA
    79c79f1 View commit details
  2. Update CodeQL bundle to 20210517 / 2.5.5

    Henning Makholm committed May 17, 2021
    Copy the full SHA
    95f5a25 View commit details

Commits on May 14, 2021

  1. Add warnings about CLI hack to codeql.ts

    These warnings refer to a hack that was added to the CLI in
    https://github.com/github/semmle-code/pull/39335
    
    They can be removed again once the CLI has a more principled way for
    the CLI to recognize that it's being invoked by the runner/action.
    Henning Makholm committed May 14, 2021
    Copy the full SHA
    e7d4215 View commit details

Commits on May 13, 2021

  1. Change include path for lines of code counting

    Previously, we were always using `**` in the include path. the
    effect of this was to always count lines in the entire
    repository unless explicitly added to the paths-ignore. This
    was incorrect behaviour. Now we only using `**` if the include
    path is otherwise empty.
    Andrew Eisenberg committed May 13, 2021
    Copy the full SHA
    8e61fc2 View commit details
  2. Use the prefix id for keying into metrics rules

    Fixes a bug where we were looking for incorrect keys for metrics rules.
    Previously, we were using full language names in the keys. Now, we use
    the short language names in the metric ids. This is done through a
    simplification of the code.
    
    Also, this change does two smaller things:
    
    1. Prints out the baseline count to the logs
    2. Adds the `assertNever` function to ensure we never miss a case in
       a switch statement. This function is borrowed from vscode-codeql.
    Andrew Eisenberg committed May 13, 2021
    Copy the full SHA
    e8b2a98 View commit details

Commits on May 10, 2021

  1. Output environment file for Windows

    Edoardo Pirovano committed May 10, 2021

    Unverified

    No user is associated with the committer email.
    Copy the full SHA
    a5506d8 View commit details
  2. Merge branch 'main' into daverlo/categoryInput

    David Verdeguer committed May 10, 2021

    Unverified

    No user is associated with the committer email.
    Copy the full SHA
    ea18d47 View commit details

Commits on May 7, 2021

  1. Fix lines of code mapping

    We were inadvertently using codeql language ids instead of the action's
    language ids. There is now a 3-way mapping between the ids used by
    the lines counter library, the action, and codeql.
    Andrew Eisenberg committed May 7, 2021

    Unverified

    No user is associated with the committer email.
    Copy the full SHA
    b6ae33f View commit details

Commits on May 6, 2021

  1. Merge branch 'main' into hmakholm/pr/fix-escaping

    Henning Makholm authored and GitHub committed May 6, 2021

    Unverified

    No user is associated with the committer email.
    Copy the full SHA
    ad98dc6 View commit details
Older