Git Product home page Git Product logo

setup-ghidra's Introduction

Actions Status

setup-ghidra

This action sets up a Ghidra environment for use in actions by:

  • optionally installing a version of Ghidra and adding to GHIDRA_INSTALL_PATH. The action will fail if no matching versions are found. To check available Ghidra version, see release note in https://ghidra-sre.org.

Inputs

version

Required Version of Ghidra. Default "latest".

Usage

Before setup Ghidra, you need to setup Java 11.0.x environment using actions/setup-java. This action doesn't use Docker, so you can use both Windows, Linux and MacOS for runs-on environment.

runs-on: ${{ matrix.os }}
strategy:
  matrix:
    os: [macos-latest, windows-latest, ubuntu-latest]
steps:
  - uses: actions/checkout@v1
  - uses: actions/setup-java@v1
    java-version: "11.0.x"
    java-package: jdk
    architecture: x64
  - uses: er28-0652/setup-ghidra@master
    with:
      version: "9.1.1"

setup-ghidra's People

Contributors

beardypig avatar dependabot[bot] avatar er28-0652 avatar fmagin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

setup-ghidra's Issues

Ability to use current git?

Would it be possible to make builds based off of the current git of ghidra?, for bleeding edge nightlys etc?

"latest" does not seem to work

I tried using "latest" in a workflow in ghidra-emotionengine, but it does not work:

Run er28-0652/setup-ghidra@master
  with:
    version: latest
  env:
    JAVA_HOME_11.0.11_x64: /opt/hostedtoolcache/jdk/11.0.11/x64
    JAVA_HOME: /opt/hostedtoolcache/jdk/11.0.11/x64
    JAVA_HOME_11_0_11_X64: /opt/hostedtoolcache/jdk/11.0.11/x64
(node:1706) UnhandledPromiseRejectionWarning: Error: versionSpec parameter is required
    at Object.find (/home/runner/work/_actions/er28-0652/setup-ghidra/master/dist/index.js:5946:17)
    at Object.<anonymous> (/home/runner/work/_actions/er28-0652/setup-ghidra/master/dist/index.js:3450:31)
    at step (/home/runner/work/_actions/er28-0652/setup-ghidra/master/dist/index.js:3281:27)
    at Object.next (/home/runner/work/_actions/er28-0652/setup-ghidra/master/dist/index.js:3218:22)
    at /home/runner/work/_actions/er28-0652/setup-ghidra/master/dist/index.js:3188:72
    at new Promise (<anonymous>)
    at __awaiter (/home/runner/work/_actions/er28-0652/setup-ghidra/master/dist/index.js:3167:18)
    at Object.installGhidra (/home/runner/work/_actions/er28-0652/setup-ghidra/master/dist/index.js:3438:16)
    at /home/runner/work/_actions/er28-0652/setup-ghidra/master/dist/index.js:6402:27
    at step (/home/runner/work/_actions/er28-0652/setup-ghidra/master/dist/index.js:6369:27)
(node:1706) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1706) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

UnhandledPromiseRejectionWarning: HttpError: API rate limit exceeded

I just ran into this error:

Run er28-0652/setup-ghidra@master
  with:
    version: 10.1
  env:
    JAVA_HOME_11.0.13_x64: /opt/hostedtoolcache/jdk/11.0.13/x64
    JAVA_HOME: /opt/hostedtoolcache/jdk/11.0.13/x64
    JAVA_HOME_11_0_13_X64: /opt/hostedtoolcache/jdk/11.0.13/x64
(node:1746) UnhandledPromiseRejectionWarning: HttpError: API rate limit exceeded for 40.85.181.4. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)
    at /home/runner/work/_actions/er28-0652/setup-ghidra/master/dist/index.js:4580:29
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:1746) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1746) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

This can be addressed with the PR #17 which allows using authenticated requests, but what I also consider a minor issue here is that the setup-ghidra action still reports success and the CI only fails one step later when I actually try to build the extension and get a:

A problem occurred evaluating project ':GhidraJupyterKotlin'.
> GHIDRA_INSTALL_DIR is not defined!

Feature Proposal: Custom Link to Ghidra Release

First off, thanks for writing this action, this makes building extensions really easy and I have been using it with various of my projects.
Currently I am working on something that (until some changes are upstreamed one day) requires a fork of Ghidra against which I am building an extension and I'd like to automatically build this extension in a GitHub Action.

The feature that would greatly help with this is the option to directly pass the link the the zip file like https://ghidra-sre.org/ghidra_9.2.2_PUBLIC_20201229.zip or in my case the link to the prebuilt fork (probably as a released asset in another public GitHub repo.

To me it looks like this should be fairly easy by adding an extra parameter to installGhidra and some logic to download the file from this URL instead of GHIDRA_BASE_URL + ghidraVersionInfo.archive.
I am not familiar with writing GitHub actions myself yet, so I can't judge if I am missing some subtleties that makes this harder, but if it is really as simple as that, I can submit a PR for this.

Fails with new Ghidra 10 Release

Using the action with

      - uses: er28-0652/setup-ghidra@master
        with:
                version: "10.0"

for the 10.0 release that came out today, seems to fail with:

Run er28-0652/setup-ghidra@master
  with:
    version: 10.0
  env:
    JAVA_HOME_11.0.11_x64: /opt/hostedtoolcache/jdk/11.0.11/x64
    JAVA_HOME: /opt/hostedtoolcache/jdk/11.0.11/x64
    JAVA_HOME_11_0_11_X64: /opt/hostedtoolcache/jdk/11.0.11/x64
Error: 649) UnhandledPromiseRejectionWarning: Error: [ERROR] 10.0 is not found.
    at Object.<anonymous> (/home/runner/work/_actions/er28-0652/setup-ghidra/master/dist/index.js:3472:25)
    at step (/home/runner/work/_actions/er28-0652/setup-ghidra/master/dist/index.js:3281:27)
    at Object.next (/home/runner/work/_actions/er28-0652/setup-ghidra/master/dist/index.js:3218:22)
    at fulfilled (/home/runner/work/_actions/er28-0652/setup-ghidra/master/dist/index.js:3170:32)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:1649) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1649) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Action is broken

Hi I'm using the action to test ghidra2dwarf, but it's currently broken.
Example: https://github.com/cesena/ghidra2dwarf/pull/6/checks?check_run_id=1433986748.

Error:

Error: Unable to process command '::set-env name=GHIDRA_INSTALL_DIR,::/opt/hostedtoolcache/ghidra/9.1.2/x64' successfully.
Error: The `set-env` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.