Skip to content

Commit

Permalink
fix: CI/flake check (formating), commented code, dev shell
Browse files Browse the repository at this point in the history
  • Loading branch information
blackheaven committed Aug 15, 2024
1 parent a3f23c9 commit a35bfe7
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 54 deletions.
4 changes: 2 additions & 2 deletions app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ sendAdvisories ghContext packageAdvisories = do
ghData =
[ "ref" := ghContext.ref,
"commit_sha" := ghContext.commitSha,
--"sharif" := encodeBase64 (compress $ encodeSarifAsLBS defaultLog {logRuns = [run]}),
"sharif" := encodeBase64 (compress $ encodeSarifAsLBS defaultLog {logRuns = [run]}),
"tool_name" := ("github-action-scan" :: Text),
"validate" := True
]
Expand All @@ -192,4 +192,4 @@ sendAdvisories ghContext packageAdvisories = do
-- log to stderr
liftIO $ hPutStrLn stderr $ "Setting: " ++ kv
-- output to stdout into $GITHUB_OUTPUT
liftIO $ hPutStrLn stdout kv
liftIO $ putStrLn kv
6 changes: 4 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,10 @@
nativeBuildInputs = [
pkgs.haskell.packages.${config.compiler-nix-name}.cabal-install
#pkgs.haskell.packages.${config.compiler-nix-name}.ghcid
#pkgs.haskell.packages.${config.compiler-nix-name}.haskell-language-server
#pkgs.haskell.packages.${config.compiler-nix-name}.hlint
pkgs.haskell.packages.${config.compiler-nix-name}.haskell-language-server
pkgs.haskell.packages.${config.compiler-nix-name}.hlint
pkgs.haskell.packages.${config.compiler-nix-name}.ormolu
pkgs.haskell.packages.${config.compiler-nix-name}.cabal-fmt
];

shellHook = ''
Expand Down
106 changes: 56 additions & 50 deletions github-action-scan.cabal
Original file line number Diff line number Diff line change
@@ -1,60 +1,66 @@
cabal-version: 3.8
name: github-action-scan
version: 0.1.0.0
author: Gautier DI FOLCO
maintainer: [email protected]
category: Data
build-type: Simple
license: ISC
license-file: LICENSE
synopsis: Scan for vulnerabilities and create advisories on GitHub
description: Scan for vulnerabilities and create advisories on GitHub.
Homepage: http://github.com/blackheaven/github-action-scan
tested-with: GHC==9.6.5
cabal-version: 3.8
name: github-action-scan
version: 0.1.0.0
author: Gautier DI FOLCO
maintainer: [email protected]
category: Data
build-type: Simple
license: ISC
license-file: LICENSE
synopsis: Scan for vulnerabilities and create advisories on GitHub
description: Scan for vulnerabilities and create advisories on GitHub.
homepage: http://github.com/blackheaven/github-action-scan
tested-with: GHC ==9.6.5

executable github-action-scan
-- type: exitcode-stdio-1.0
main-is: Main.hs
hs-source-dirs: app
main-is: Main.hs
hs-source-dirs: app
default-extensions:
DataKinds
DefaultSignatures
DeriveAnyClass
DeriveGeneric
DerivingStrategies
DerivingVia
DuplicateRecordFields
FlexibleContexts
GADTs
GeneralizedNewtypeDeriving
KindSignatures
LambdaCase
OverloadedRecordDot
OverloadedStrings
RankNTypes
RecordWildCards
ScopedTypeVariables
TypeApplications
TypeFamilies
TypeOperators
ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wpartial-fields -Wredundant-constraints
DataKinds
DefaultSignatures
DeriveAnyClass
DeriveGeneric
DerivingStrategies
DerivingVia
DuplicateRecordFields
FlexibleContexts
GADTs
GeneralizedNewtypeDeriving
KindSignatures
LambdaCase
OverloadedRecordDot
OverloadedStrings
RankNTypes
RecordWildCards
ScopedTypeVariables
TypeApplications
TypeFamilies
TypeOperators

ghc-options:
-threaded -rtsopts -with-rtsopts=-N -Wall -Wcompat -Widentities
-Wincomplete-record-updates -Wincomplete-uni-patterns
-Wpartial-fields -Wredundant-constraints

build-depends:
base
, optparse-applicative
, text
, github-rest
, sarif
, bytestring
, zlib
, http-types
, base
, base64
, bytestring
, Cabal
, cabal-audit
, cabal-install
, Cabal-syntax
, hsec-tools
, fused-effects
, containers
, process
, cabal-install
, Cabal
, fused-effects
, github-rest
, hsec-tools
, http-types
, kan-extensions
default-language: Haskell2010
, optparse-applicative
, process
, sarif
, text
, zlib

default-language: Haskell2010

0 comments on commit a35bfe7

Please sign in to comment.