Skip to content

Commit 2f843b5

Browse files
authored
Merge pull request #22 from RedHatProductSecurity/update-readme
update readme with details of trust-prime and production URLs for Atlas
2 parents ca0f3ca + 6d60779 commit 2f843b5

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,22 @@ $ pip install git+https://github.com/RedHatProductSecurity/trustshell.git#egg=tr
1515

1616
Ensure the following environment variables are set:
1717

18-
`export TRUSTIFY_URL="https://atlas.release.stage.devshift.net"`
18+
Atlas Production:
19+
`export TRUSTIFY_URL="https://atlas.release.devshift.net"`
20+
`export AUTH_ENDPOINT="https://auth.redhat.com/auth/realms/EmployeeIDP/protocol/openid-connect"`
1921

2022

21-
stage:
23+
Atlas Stage:
2224

25+
`export TRUSTIFY_URL="https://atlas.release.stage.devshift.net"`
2326
`export AUTH_ENDPOINT="https://auth.stage.redhat.com/auth/realms/EmployeeIDP/protocol/openid-connect"`
2427

2528
## Usage
2629

2730
### Find matching PackageURLs in Trustify:
31+
Each component in Atlas has a PackageURL (purl). This helps remove ambiguity around the type of component.
32+
Before relating a component to a product, you first need to determine the purl of the component.
33+
You can do using trustshell, eg:
2834

2935
```commandline
3036
$ trust-purl qemu
@@ -35,6 +41,7 @@ pkg:rpm/redhat/[email protected]+el8.10.0+22375+ea5e8167.2
3541
```
3642

3743
### Find matching products for purl:
44+
Once you have a PackageURL, you can then relate that to any products using the `trust-products` command. For example:
3845

3946
```commandline
4047
$ trust-products pkg:oci/quay-builder-qemu-rhcos-rhel8
@@ -44,3 +51,18 @@ pkg:oci/quay-builder-qemu-rhcos-rhel8
4451
└── pkg:oci/quay-builder-qemu-rhcos-rhel8?tag=v3.12.8-1
4552
└── cpe:/a:redhat:quay:3:*:el8:*
4653
```
54+
55+
### Prime the Trusify graph:
56+
If components are found with the trust-purl command, but they are not being linked to products with
57+
trust-products, it could be because the Trustify graph cache is not yet primed. In order to prime the graph
58+
cache run the `trust-prime` command as follows.
59+
60+
```commandline
61+
# trust-prime
62+
Status before prime:
63+
graph count: 0
64+
sbom_count: 673
65+
Priming graph ...
66+
```
67+
68+
It can also be run with `--check` to see the graph and sbom counts without actually priming the garph cache.

src/trustshell/products.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
@click.command()
3333
@click.option("--check", "-c", is_flag=True, help="Check the status only, don't prime")
3434
def prime_cache(check: bool):
35-
"""Prime the analysis/component cache"""
35+
"""Prime the analysis/component graph cache"""
3636
auth_header = {}
3737
if AUTH_ENABLED:
3838
access_token = check_or_get_access_token()
@@ -48,7 +48,7 @@ def prime_cache(check: bool):
4848
console.print(f"graph count: {graph_count}")
4949
console.print(f"sbom_count: {sbom_count}")
5050
if not check:
51-
console.print("Priming graph ...")
51+
console.print("Priming graph cache...")
5252
httpx.get(f"{TRUSTIFY_URL}analysis/component", headers=auth_header, timeout=60)
5353

5454

0 commit comments

Comments
 (0)