Integration with Advanced Features¶
Introduction¶
This page introduces advanced features available when integrating Licensight Scan into your CI pipelines, such as GitHub Actions or GitLab CI. These features provide greater control over scan behavior, including the ability to prevent using violated packages and exclude specific directories from scans.
⚠️ Before using these features, make sure your platform-specific variables and secrets are properly configured. Setup instructions are provided in the dedicated integration pages for GitHub and GitLab.
Break the Build (-btb)¶
If -btb
flag is set, Licensight Scan will return a non-zero exit code if the feature branch introduces any new policy violations. This flag can be used to prevent merging violated packages into the default branch.
⚠️
Important
: The default branch (e.g., main) must be scanned at least once before using this feature. Refer toScan on Default Branch
.
Provide -btb
flag to pipeline:
./licensight-scan generate \
-d . \
-a "$LICENSIGHT_APPLICATION_NAME" \
-e $LICENSIGHT_URL \
-at $LICENSIGHT_ACCESS_TOKEN \
-b $CI_COMMIT_REF_NAME \
-dpr true \
-btb true
Gitlab pipeline fails when the feature branch introduces some new violated packages:
Github Actions fails when the feature branch introduces some new violated packages:
Excluding Directories from Component Scan (-del
)¶
You can use the -del
option to exclude specific folders from being scanned. This is useful when you want to skip or ignore certain directories during the scanning process.
./licensight-scan generate \
-d . \
-a "$LICENSIGHT_APPLICATION_NAME" \
-e $LICENSIGHT_URL \
-at $LICENSIGHT_ACCESS_TOKEN \
-b $CI_COMMIT_REF_NAME \
-dpr true \
-del "**/service-identify/**;**/service-security/**"
Gitlab pipeline result:
Github Actions result:
Troubleshooting Common Issues¶
Issue | Description | Solution |
---|---|---|
Exit code 1 | Policy violations found and -btb is enabled |
Review the scan report and fix violations |
Scan result is not visible in Licensight platform |
|
|
Pipeline does not fail when -btb flag is used |
|
Run a scan on the default branch first |
Error: No dependencies found |
|
|