advanced-security / policy-as-code

GitHub Advanced Security Policy as Code
MIT License
67 stars 13 forks source link

[Bug]: DependancyAlert missing inputs on init #120

Open Killklli opened 2 months ago

Killklli commented 2 months ago

What happened?

We're getting errors on every pull request of any type for dependancies.

An unexpected exception was encountered while performing policy checks. Please report this to https://github.com/advanced-security/policy-as-code DependencyAlert.init() missing 2 required positional arguments: 'state' and 'severity'

Version

v2 (current major version)

Where are you experiencing the issue?

GitHub Actions

Relevant log output

INFO:root:GitHub Repository :: testorg/verademo-2
INFO:root:GitHub Instance :: https://github.com
INFO:root:GitHub Reference (branch/pr) :: refs/pull/9/merge
INFO:root:Policy config file set: /home/runner/work/_actions/testorg/scan-test/develop/policy.yml
INFO:root:Loading policy file - /home/runner/work/_actions/testorg/scan-test/develop/policy.yml
INFO:root:Policy loaded successfully
INFO:root:Saving Policy...
INFO:root:Policy saved
INFO:root:Finished loading policy
INFO:root:Policy as Code Summary:
INFO:root:
INFO:root:codescanning: 'error'
INFO:root:dependabot: 'moderate'
INFO:root:licensing: 'None'
INFO:root:dependencies: 'all'
INFO:root:secretscanning: 'all'
INFO:root:general: 'error'
INFO:root:```
INFO:root:Code Scanning Alerts from Pull Request (alert diff)
INFO:root:Total Code Scanning Alerts :: 0
INFO:root:Code Scanning violations :: 0
INFO:root:Dependabot Alerts from Pull Request
ERROR:root:Unknown Exception was hit, please repo this to https://github.com/advanced-security/policy-as-code
 _____  _   _   ___   _____ _____                       _ _                      
ERROR:root:DependencyAlert.__init__() missing 2 required positional arguments: 'state' and 'severity'
|  __ \| | | | / _ \ /  ___/  __ \                     | (_)                     
| |  \/| |_| |/ /_\ \\ `--.| /  \/ ___  _ __ ___  _ __ | |_  __ _ _ __   ___ ___ 
| | __ |  _  ||  _  | `--. \ |    / _ \| '_ ` _ \| '_ \| | |/ _` | '_ \ / __/ _ \
| |_\ \| | | || | | |/\__/ / \__/\ (_) | | | | | | |_) | | | (_| | | | | (_|  __/
 \____/\_| |_/\_| |_/\____/ \____/\___/|_| |_| |_| .__/|_|_|\__,_|_| |_|\___\___|
                                                 | |                             
                                                 |_|         v2.7.3
    GitHub Advanced Security Policy as Code by GeekMasher

GitHub Repository :: testorg/verademo-2
GitHub Instance :: https://github.com
GitHub Reference (branch/pr) :: refs/pull/9/merge
Policy as Code
  Policy config file set: /home/runner/work/_actions/testorg/scan-test/develop/policy.yml
  Loading policy file - /home/runner/work/_actions/testorg/scan-test/develop/policy.yml
  Policy loaded successfully
  Saving Policy...
  Policy saved
  Finished loading policy
  Policy as Code Summary:

codescanning: 'error' dependabot: 'moderate' licensing: 'None' dependencies: 'all' secretscanning: 'all' general: 'error'

Code Scanning Results
  Code Scanning Alerts from Pull Request (alert diff)
  Total Code Scanning Alerts :: 0
  Code Scanning violations :: 0
Dependabot Results
  Dependabot Alerts from Pull Request
  Error: Unknown Exception was hit, please repo this to https://github.com/advanced-security/policy-as-code
  Error: DependencyAlert.__init__() missing 2 required positional arguments: 'state' and 'severity'
  INFO:root:Dependencies from Pull Request
  ERROR:root:Unknown Exception was hit, please repo this to https://github.com/advanced-security/policy-as-code
Dependency Graph
  ERROR:root:DependencyAlert.__init__() missing 2 required positional arguments: 'state' and 'severity'
  Dependencies from Pull Request
  Error: Unknown Exception was hit, please repo this to https://github.com/advanced-security/policy-as-code
  Error: DependencyAlert.__init__() missing 2 required positional arguments: 'state' and 'severity'
  INFO:root:Dependencies from Pull Request
  ERROR:root:Unknown Exception was hit, please repo this to https://github.com/advanced-security/policy-as-code
Dependency Graph Results - Licensing
  ERROR:root:DependencyAlert.__init__() missing 2 required positional arguments: 'state' and 'severity'
  Dependencies from Pull Request
  Error: Unknown Exception was hit, please repo this to https://github.com/advanced-security/policy-as-code
  Error: DependencyAlert.__init__() missing 2 required positional arguments: 'state' and 'severity'
  INFO:root:Secret Scanning Alerts from Pull Request
  INFO:root:Total Secret Scanning Alerts :: 0
  INFO:root:Secret Scanning violations :: 0
  INFO:root:Total unacceptable alerts :: 3
Secret Scanning Results
  Secret Scanning Alerts from Pull Request
  Total Secret Scanning Alerts :: 0
  Secret Scanning violations :: 0

Summary
  Total unacceptable alerts :: 3
  Error: Unacceptable Threshold of Risk has been hit!
  ERROR:root:Unacceptable Threshold of Risk has been hit!
  Error: Process completed with exit code 1.

Code of Conduct

GeekMasher commented 1 month ago

@Killklli can you please test out v2.8.0 release and see if this fixes the issues

Killklli commented 1 month ago

Yeah this seemed to have fixed it

amanaknows commented 1 month ago

😇