Coder Social home page Coder Social logo

Comments (9)

thc202 avatar thc202 commented on June 3, 2024 2

Following the behaviour of other tools (e.g. LGTM), comment always with the difference between the latest changes of the PR and the base branch.

This will have to be done in two steps, e.g. first creates the data and the second adds the comment (using pull_request_target event).

from action-baseline.

NissesSenap avatar NissesSenap commented on June 3, 2024 2

Any update on this?
Personally It would be enough for me to see the ZAP output on PR and you don't have to mix in any previous scan results.
First step keep it simple and second step you can mix in some extra things like comparing between old commits.

from action-baseline.

sshniro avatar sshniro commented on June 3, 2024

Good suggestion, but I assume this should run in conjunction with locally building the webapp, and then running the baseline scan against the local app.

from action-baseline.

hazcod avatar hazcod commented on June 3, 2024

Indeed, the url can be extracted from a previous job output variable and used as input to zap.

from action-baseline.

sshniro avatar sshniro commented on June 3, 2024

I would like to start working on this issue: would like to get some clarifications, @psiinon @thc202

  1. If a user commits to a pull request should we report the new results of ZAP as a comment or comment on the difference between the previous commit and current commit?

Example: Alert x has been newly identified?

from action-baseline.

NissesSenap avatar NissesSenap commented on June 3, 2024

Did a rather simple version of this that you can definitly improve but at least it runs zap on each PR.
Shoulden't be to hard to add rules for zap, one way could be to store them in the repo which you probably should do any way.

https://github.com/XenitAB/opa-bundle-api/pull/3/files

name: ZAP PR Validation

on: pull_request

jobs:
  zap:
    timeout-minutes: 5
    runs-on: ubuntu-latest
    env:
      GO111MODULE: on
    steps:
      - name: Clone repo
        uses: actions/[email protected]
      - name: Setup go
        uses: actions/setup-go@v2
        with:
          go-version: "^1.16.2"
      - name: Run application
        run: |
          go mod download
          timeout 120s go run ./cmd/opa-bundle-api/main.go &
          docker run -t owasp/zap2docker-stable zap-baseline.py -t http://$(ip -f inet -o addr show docker0 | awk '{print $4}' | cut -d '/' -f 1):8080

from action-baseline.

BrandonOldenhof avatar BrandonOldenhof commented on June 3, 2024

Sneaky bump on this issue: I'm looking for this exact functionality; from what I've seen in the docs, so far, it looks like we'd need a single input to be added that lets us add an existing issue id to overwrite :

Every pull request is an issue, but not every issue is a pull request. For this reason, "shared" actions for both features, like manipulating assignees, labels and milestones, are provided within the Issues API.

https://docs.github.com/en/rest/reference/pulls

I'm pretty sure we can get that PR id in the workflow by using the GITHUB_REF variable.

from action-baseline.

psiinon avatar psiinon commented on June 3, 2024

@sshniro are you still able to look at this?
If not then no problem but we'll unassign you and try to encourage someone else to look at it :)

from action-baseline.

sshniro avatar sshniro commented on June 3, 2024

Hi @psiinon unfortunately I will be not able to look into this during this month, would highly welcome any contribution from someone else.

from action-baseline.

Related Issues (20)

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.