[Request for Comments] GitHub haskell-security-action

Hello everyone,

I’m part of the Haskell Security Response Team.
One of the main goal of the team was to provide a proper GitHub integration.
It is a long way to have it, as dependabot is currently closed to new programming languages.
Hopefully, GitHub provides actions and an API to load scan results.
Over the last weeks (I have been busy), I have came up with haskell-security-action, based on cabal-audit.
It’s currently hack-ish, and there are a lot of short-comings, it does the job.

Many thanks to @MangoIV @Kleidukos @julm

My hope with this thread is to collect comments, issues, bugs, ideas, feature requests(, contributors maybe?).

After a stabilization period, I want to transfer it back to @haskell.

Thanks in advance.

11 Likes

I don’t know if it’d make sense in your opinion, but if it’s possible, we can also make this part of cabal-audit. I’d be happy to think about the shortcomings, as well as I assume that they’re mostly shortcomings of cabal-audit.

I mean, if cabal-audit can produce a sarif file, it’ll be simplified as just few nix/yaml file.

Another concern was packaging a static binary.

I am already producing a fully static binary so that shouldn’t be an issue.

And yeah I think it would be fine to add a new subcommand „ci“ that could house all the things you’d need from cabal-audit.

1 Like

sarif could be a regular output.

Yeah, however you’d like and fits best. There’s also this issue which we can use for further discussion

As you can see there’s already a —ci flag which will return a non-zero exit code whenever there’s an advisory.

About the static exe:

This output builds the fully static cabal-audit with musl.

see the file static.nix to see how it’s built.

I’ll have a look at the static part.

It’s a bit more subtle than an error:

  • I collect the advisories from cabal-audit
  • regroup them
  • create the sarif data structure
  • I upload it through GitHub API
1 Like

Yea as I said, anything is good. :slight_smile: