Skip to content

Commit

Permalink
update pipeline code and changed scorecode hash commit nexB#1283
Browse files Browse the repository at this point in the history
Signed-off-by: 404-geek <[email protected]>
  • Loading branch information
404-geek committed Jul 15, 2024
1 parent 24c7be0 commit 259f004
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 135 deletions.
10 changes: 5 additions & 5 deletions scanpipe/pipelines/get_scorecard_info_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# Visit https://github.com/nexB/scancode.io for support and download.

from scanpipe.pipelines import Pipeline
from scanpipe.pipes import scorecode
from ossf_scorecard import scorecard


class FetchScoreCodeInfo(Pipeline):
Expand All @@ -39,21 +39,21 @@ def steps(cls):
return (
cls.check_scorecode_service_availability,
cls.lookup_packages_scorecode_info,
cls.lookup_dependencies_scorecode_info,
# cls.lookup_dependencies_scorecode_info,
)

def check_scorecode_service_availability(self):
"""Check if the scorecode service is configured and available."""
if not scorecode.is_configured():
if not scorecard.is_configured():
raise Exception("scorecode service is not configured.")

if not scorecode.is_available():
if not scorecard.is_available():
raise Exception("scorecode service is not available.")

def lookup_packages_scorecode_info(self):
"""Fetch scorecode information for each of the project's discovered packages."""
packages = self.project.discoveredpackages.all()
scorecode.fetch_scorecode_info(
scorecard.fetch_scorecard_info(
packages=packages,
logger=self.log,
)
129 changes: 0 additions & 129 deletions scanpipe/pipes/scorecode.py

This file was deleted.

2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ install_requires =
# MatchCode-toolkit
matchcode-toolkit==5.1.0
# ScoreCode
ScoreCode[full] @ git+https://github.com/nexB/ScoreCode.git@c0ec90bb33148c881acd13db72893a28b3ce62e1
ScoreCode[full] @ git+https://github.com/nexB/ScoreCode.git@1fa09b5ecdcc7813600e69bce38d42ed53cb364d
# Univers
univers==30.11.0
# Markdown
Expand Down

0 comments on commit 259f004

Please sign in to comment.