42Crunch / api-security-audit-action

Apache License 2.0
33 stars 14 forks source link

Exception when trying to parse the file Properties/launchSettings.json #4

Closed 0GiS0 closed 1 year ago

0GiS0 commented 2 years ago

Hi all!

I was trying to test this action with a .NET Core Web API project but when the default workflow launches I get this error:

Error: Error: Unexpected exception "Exception when trying to parse the file Properties/launchSettings.json: Unexpected token  in JSON at position 0 "

Any thoughts?

Thanks!

ak1394 commented 2 years ago

Hi! In order to find all OpenAPI files in the project, this github action attempts to parse all JSON and YAML files in the project. It looks like one of the files it finds, is not a valid JSON file.

The easiest way to solve it, is to add Properties/launchSettings.json to a list of files to be ignored, which can be done by adding a 42c-conf.yaml file to the root of the project.

Please have a look at one of the examples of the config file here: https://github.com/42Crunch/resources/tree/master/cicd/42c-conf-examples/ in particular one in the "discovery" folder.

isamauny commented 1 year ago

Closed for inactivity.