@jfrog/opencode-jfrog-plugin 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +105 -51
- package/dist/index.js +30 -238
- package/package.json +6 -6
- package/skills/jfrog/SKILL.md +529 -0
- package/skills/jfrog/assets/.gitkeep +0 -0
- package/skills/jfrog/references/apptrust-entities.md +154 -0
- package/skills/jfrog/references/artifactory-api-gaps.md +206 -0
- package/skills/jfrog/references/artifactory-aql-syntax.md +656 -0
- package/skills/jfrog/references/artifactory-entities.md +236 -0
- package/skills/jfrog/references/artifactory-operations.md +178 -0
- package/skills/jfrog/references/catalog-entities.md +219 -0
- package/skills/jfrog/references/general-bulk-operations-and-agent-patterns.md +93 -0
- package/skills/jfrog/references/general-parallel-execution.md +131 -0
- package/skills/jfrog/references/general-use-case-hints.md +27 -0
- package/skills/jfrog/references/jfrog-brand-html-report.md +98 -0
- package/skills/jfrog/references/jfrog-cli-install-upgrade.md +30 -0
- package/skills/jfrog/references/jfrog-entity-index.md +112 -0
- package/skills/jfrog/references/jfrog-login-flow.md +132 -0
- package/skills/jfrog/references/jfrog-url-references.md +51 -0
- package/skills/jfrog/references/onemodel-common-patterns.md +323 -0
- package/skills/jfrog/references/onemodel-graphql.md +446 -0
- package/skills/jfrog/references/onemodel-query-examples.md +753 -0
- package/skills/jfrog/references/platform-access-entities.md +200 -0
- package/skills/jfrog/references/platform-admin-api-gaps.md +164 -0
- package/skills/jfrog/references/platform-admin-operations.md +58 -0
- package/skills/jfrog/references/projects-api.md +241 -0
- package/skills/jfrog/references/release-lifecycle-entities.md +180 -0
- package/skills/jfrog/references/stored-packages-entities.md +165 -0
- package/skills/jfrog/references/xray-entities.md +740 -0
- package/skills/jfrog/scripts/check-environment.sh +224 -0
- package/skills/jfrog/scripts/jfrog-login-register-session.sh +84 -0
- package/skills/jfrog/scripts/jfrog-login-save-credentials.sh +128 -0
- package/skills/jfrog-package-safety-and-download/SKILL.md +275 -0
- package/sync-skills-vendor.json +5 -0
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# Artifactory entities
|
|
2
|
+
|
|
3
|
+
When to read this file:
|
|
4
|
+
|
|
5
|
+
- Working with **repositories** and you need to understand the difference between local, remote, virtual, and federated types.
|
|
6
|
+
- Managing **artifacts**, **properties**, or **package types**.
|
|
7
|
+
- Working with **builds**, **build promotion**, or **permission targets**.
|
|
8
|
+
- Debugging unexpected behavior related to repo types (e.g. upload failures, missing search results).
|
|
9
|
+
|
|
10
|
+
For CLI commands see `artifactory-operations.md`. For API gaps see
|
|
11
|
+
`artifactory-api-gaps.md`. For AQL syntax see `artifactory-aql-syntax.md`.
|
|
12
|
+
|
|
13
|
+
## Repositories
|
|
14
|
+
|
|
15
|
+
A repository is the primary storage and resolution unit in Artifactory. Every
|
|
16
|
+
repo has a **key** (unique identifier), a **package type** (immutable after
|
|
17
|
+
creation), and a **repository class** (`rclass`) that determines its behavior.
|
|
18
|
+
|
|
19
|
+
### Repository types
|
|
20
|
+
|
|
21
|
+
| Type | `rclass` | Behavior | Stores artifacts? |
|
|
22
|
+
|------|----------|----------|-------------------|
|
|
23
|
+
| **Local** | `local` | Hosts artifacts deployed directly (upload, promote, copy, move) | Yes |
|
|
24
|
+
| **Remote** | `remote` | Proxies an external URL; downloads are cached in a companion `-cache` repo | Only in the `-cache` repo |
|
|
25
|
+
| **Virtual** | `virtual` | Aggregates multiple local and remote repos under a single URL for resolution | No (resolves from underlying repos) |
|
|
26
|
+
| **Federated** | `federated` | Local repo that bi-directionally synchronizes across Platform Deployments | Yes (replicated across sites) |
|
|
27
|
+
|
|
28
|
+
### Key relationships and fields
|
|
29
|
+
|
|
30
|
+
- `key` — unique repo identifier (e.g. `libs-release-local`)
|
|
31
|
+
- `packageType` — determines layout and protocol (see Package types below)
|
|
32
|
+
- `rclass` — `local`, `remote`, `virtual`, or `federated`
|
|
33
|
+
- `url` — (remote only) the external source URL being proxied
|
|
34
|
+
- `repositories` — (virtual only) ordered list of local/remote repos to aggregate
|
|
35
|
+
- `projectKey` — links repo to a JFrog Project (see `platform-access-entities.md`)
|
|
36
|
+
- `environments` — environments the repo is assigned to (used in RBAC and lifecycle)
|
|
37
|
+
|
|
38
|
+
### System repositories
|
|
39
|
+
|
|
40
|
+
Artifactory and Xray maintain several **system repositories** for internal
|
|
41
|
+
platform metadata. These are not user-created and should be excluded when
|
|
42
|
+
iterating over repositories for reporting, scanning, or auditing:
|
|
43
|
+
|
|
44
|
+
| Pattern | Purpose |
|
|
45
|
+
|---------|---------|
|
|
46
|
+
| `release-bundles` | Release Bundles V1 metadata |
|
|
47
|
+
| `release-bundles-v2` | Release Bundles V2 metadata |
|
|
48
|
+
| `artifactory-build-info` | Default build info storage |
|
|
49
|
+
| `*-release-bundles` | Project-scoped Release Bundles V1 |
|
|
50
|
+
| `*-release-bundles-v2` | Project-scoped Release Bundles V2 |
|
|
51
|
+
| `*-build-info` | Project-scoped build info storage |
|
|
52
|
+
| `*-application-versions` | AppTrust application version metadata |
|
|
53
|
+
|
|
54
|
+
Including these in aggregate queries (violation counts, storage reports, etc.)
|
|
55
|
+
produces misleading results because they contain platform metadata rather than
|
|
56
|
+
user artifacts.
|
|
57
|
+
|
|
58
|
+
### Remote repository cache
|
|
59
|
+
|
|
60
|
+
When Artifactory downloads an artifact through a remote repo, it stores the
|
|
61
|
+
cached copy in a **separate local repo** named `<remote-key>-cache`. This is
|
|
62
|
+
critical for:
|
|
63
|
+
|
|
64
|
+
- **AQL queries** — search the `-cache` repo, not the remote repo key
|
|
65
|
+
- **Properties** — properties on cached artifacts live on the `-cache` repo
|
|
66
|
+
- **Storage calculations** — cached artifacts consume storage under the `-cache` repo
|
|
67
|
+
|
|
68
|
+
The remote repo key itself is used for **configuration** (URL, credentials,
|
|
69
|
+
inclusion/exclusion patterns) but does not directly contain artifacts.
|
|
70
|
+
|
|
71
|
+
### Virtual repository resolution
|
|
72
|
+
|
|
73
|
+
A virtual repo aggregates **both local and remote repos** under a single URL.
|
|
74
|
+
It resolves artifacts by searching its underlying repos in the configured
|
|
75
|
+
**order** — when the same artifact exists in multiple underlying repos, the
|
|
76
|
+
first match wins.
|
|
77
|
+
|
|
78
|
+
A virtual repo may designate one of its underlying **local** repos as the
|
|
79
|
+
**default deployment repository**. Uploads through the virtual URL are routed
|
|
80
|
+
to that local repo. Without a default deployment repo, the virtual repo is
|
|
81
|
+
read-only.
|
|
82
|
+
|
|
83
|
+
```mermaid
|
|
84
|
+
erDiagram
|
|
85
|
+
VirtualRepo ||--o{ LocalRepo : "aggregates"
|
|
86
|
+
VirtualRepo ||--o{ RemoteRepo : "aggregates"
|
|
87
|
+
VirtualRepo ||--o| LocalRepo : "defaultDeploymentRepo"
|
|
88
|
+
RemoteRepo ||--|| CacheRepo : "has -cache"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Artifacts
|
|
92
|
+
|
|
93
|
+
An artifact is a file stored in a repository. Each artifact is uniquely
|
|
94
|
+
identified by the triple **repo + path + name**.
|
|
95
|
+
|
|
96
|
+
Key attributes:
|
|
97
|
+
- `repo`, `path`, `name` — location identifier
|
|
98
|
+
- `size` — bytes
|
|
99
|
+
- `sha256`, `sha1`, `md5` — checksums (sha256 is the primary identifier for cross-referencing with builds and Xray)
|
|
100
|
+
- `created`, `modified`, `created_by`, `modified_by` — audit fields
|
|
101
|
+
|
|
102
|
+
Artifacts are **content-addressable** — build info and Xray reference them by
|
|
103
|
+
checksum, not by path. Moving or copying an artifact changes its path but not
|
|
104
|
+
its checksum, so build associations follow the artifact.
|
|
105
|
+
|
|
106
|
+
## Properties
|
|
107
|
+
|
|
108
|
+
Key-value metadata pairs attached to artifacts or folders.
|
|
109
|
+
|
|
110
|
+
- Keys are strings; values are strings or arrays of strings
|
|
111
|
+
- Set via `jf rt set-props`, queried via AQL or the properties API
|
|
112
|
+
- Commonly used for: build metadata, maturity labels, promotion tracking, cleanup policies
|
|
113
|
+
- Properties on remote-cached artifacts live on the `-cache` repo
|
|
114
|
+
|
|
115
|
+
## Package types
|
|
116
|
+
|
|
117
|
+
The `packageType` field on a repository determines how Artifactory interprets
|
|
118
|
+
its contents. It controls directory structure conventions, metadata extraction,
|
|
119
|
+
and which client protocols are supported (e.g. Docker registry API, npm
|
|
120
|
+
registry, Maven layout).
|
|
121
|
+
|
|
122
|
+
Common types: `maven`, `gradle`, `npm`, `docker`, `pypi`, `nuget`, `go`,
|
|
123
|
+
`helm`, `rpm`, `debian`, `generic`.
|
|
124
|
+
|
|
125
|
+
Package type is **immutable** — it cannot be changed after repo creation. Use
|
|
126
|
+
`generic` when no specific package type applies.
|
|
127
|
+
|
|
128
|
+
## Build info
|
|
129
|
+
|
|
130
|
+
A build info record captures CI/CD metadata: which artifacts were produced,
|
|
131
|
+
which dependencies were consumed, and the build environment.
|
|
132
|
+
|
|
133
|
+
| Field | Description |
|
|
134
|
+
|-------|-------------|
|
|
135
|
+
| `name` + `number` | Unique identifier for a build run |
|
|
136
|
+
| `modules` | List of modules, each with its own artifacts and dependencies |
|
|
137
|
+
| `vcs` | Version control metadata (revision, URL, branch) |
|
|
138
|
+
| `buildAgent`, `agent` | CI tool info |
|
|
139
|
+
| `properties` | Custom build-level properties |
|
|
140
|
+
|
|
141
|
+
Build info references artifacts **by checksum** (sha256). This means:
|
|
142
|
+
- A build can reference artifacts across multiple repositories
|
|
143
|
+
- Moving an artifact does not break the build association
|
|
144
|
+
- Xray scans build info by resolving checksums to components
|
|
145
|
+
|
|
146
|
+
Lifecycle: collect → publish → (optionally) promote → (optionally) scan.
|
|
147
|
+
|
|
148
|
+
## Build promotion
|
|
149
|
+
|
|
150
|
+
Promotion changes a build's **status** and can copy or move its artifacts
|
|
151
|
+
from a source repo to a target repo.
|
|
152
|
+
|
|
153
|
+
| Field | Description |
|
|
154
|
+
|-------|-------------|
|
|
155
|
+
| `status` | Target status label (e.g. `staged`, `released`) |
|
|
156
|
+
| `sourceRepo` | Where artifacts currently reside |
|
|
157
|
+
| `targetRepo` | Where artifacts should be moved/copied |
|
|
158
|
+
| `copy` | If `true`, copy instead of move |
|
|
159
|
+
|
|
160
|
+
Promotion records are queryable via AQL (`build.promotions` domain) and the
|
|
161
|
+
build promotion API.
|
|
162
|
+
|
|
163
|
+
## Permissions
|
|
164
|
+
|
|
165
|
+
Permissions define RBAC policies mapping **resources** and **principals**
|
|
166
|
+
(users and groups) to **actions**. Two models exist:
|
|
167
|
+
|
|
168
|
+
### Permissions V2 (Access Permissions) — current model
|
|
169
|
+
|
|
170
|
+
Managed by the **Access service** (since Artifactory 7.72.0, recommended from
|
|
171
|
+
7.77.2). Supports all resource types.
|
|
172
|
+
|
|
173
|
+
| Component | Description |
|
|
174
|
+
|-----------|-------------|
|
|
175
|
+
| `name` | Permission name |
|
|
176
|
+
| `resources` | Map of resource type → targets + actions |
|
|
177
|
+
|
|
178
|
+
Resource types: `artifact` (repositories), `build`, `release_bundle`,
|
|
179
|
+
`destination` (Edge nodes), `pipeline_source`.
|
|
180
|
+
|
|
181
|
+
Each resource contains:
|
|
182
|
+
- `targets` — map of target names/patterns to include/exclude patterns
|
|
183
|
+
- `actions.users` — map of username → list of actions
|
|
184
|
+
- `actions.groups` — map of group name → list of actions
|
|
185
|
+
|
|
186
|
+
Actions use uppercase: `READ`, `ANNOTATE`, `DEPLOY/CACHE`, `DELETE/OVERWRITE`,
|
|
187
|
+
`MANAGE_XRAY_METADATA`, `MANAGE`.
|
|
188
|
+
|
|
189
|
+
API: `POST/PUT/GET/DELETE /access/api/v2/permissions/{permissionName}`.
|
|
190
|
+
|
|
191
|
+
Documentation: [Permissions](https://docs.jfrog.com/administration/docs/permissions).
|
|
192
|
+
|
|
193
|
+
### Permission targets (V1) — legacy model
|
|
194
|
+
|
|
195
|
+
Managed by **Artifactory**. Still functional and backwards compatible, but
|
|
196
|
+
V2 is recommended for new implementations. The CLI `jf rt permission-target-*`
|
|
197
|
+
commands use this API.
|
|
198
|
+
|
|
199
|
+
| Component | Description |
|
|
200
|
+
|-----------|-------------|
|
|
201
|
+
| `repositories` | List of repo keys or patterns |
|
|
202
|
+
| `actions.users` | Map of username → list of actions |
|
|
203
|
+
| `actions.groups` | Map of group name → list of actions |
|
|
204
|
+
|
|
205
|
+
Actions use lowercase: `read`, `write`, `annotate`, `delete`, `manage`.
|
|
206
|
+
|
|
207
|
+
Does **not** support `destination` or `pipeline_source` resource types.
|
|
208
|
+
|
|
209
|
+
API: `PUT /artifactory/api/security/permissions/{permissionName}`.
|
|
210
|
+
|
|
211
|
+
### Key differences
|
|
212
|
+
|
|
213
|
+
| Aspect | V1 (Permission Targets) | V2 (Access Permissions) |
|
|
214
|
+
|--------|------------------------|------------------------|
|
|
215
|
+
| Managed by | Artifactory | Access service |
|
|
216
|
+
| API base | `/artifactory/api/security/permissions/` | `/access/api/v2/permissions/` |
|
|
217
|
+
| Actions | lowercase (`read`, `write`) | uppercase (`READ`, `WRITE`) |
|
|
218
|
+
| Resource types | repos, builds, release bundles | + destinations, pipeline sources |
|
|
219
|
+
| Pattern fields | `includes_pattern` / `excludes_pattern` | `include_patterns` / `exclude_patterns` |
|
|
220
|
+
| CLI support | `jf rt permission-target-*` | No direct CLI commands (use REST) |
|
|
221
|
+
|
|
222
|
+
For project-scoped RBAC, see Project roles in `platform-access-entities.md`.
|
|
223
|
+
|
|
224
|
+
## Replication
|
|
225
|
+
|
|
226
|
+
Replication synchronizes artifacts and properties between repositories, either
|
|
227
|
+
within the same instance or across Platform Deployments.
|
|
228
|
+
|
|
229
|
+
| Type | Direction | Trigger |
|
|
230
|
+
|------|-----------|---------|
|
|
231
|
+
| **Push** | Source pushes to target | Scheduled or event-based |
|
|
232
|
+
| **Pull** | Target pulls from source | Scheduled |
|
|
233
|
+
|
|
234
|
+
Replication configs are JSON templates applied per repository. Both artifact
|
|
235
|
+
content and properties are replicated. For federated repos, replication is
|
|
236
|
+
automatic and bi-directional across all member nodes.
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Artifactory Operations
|
|
2
|
+
|
|
3
|
+
CLI commands for managing Artifactory resources. All commands use the `jf rt`
|
|
4
|
+
namespace. Run `jf rt --help` to discover subcommands not listed here.
|
|
5
|
+
|
|
6
|
+
## Repository management
|
|
7
|
+
|
|
8
|
+
Repositories are created from JSON templates. The workflow is:
|
|
9
|
+
|
|
10
|
+
1. Get a template: retrieve an existing repo config via
|
|
11
|
+
`jf api /artifactory/api/repositories/<repo-key>`
|
|
12
|
+
and modify it, or craft JSON manually.
|
|
13
|
+
Note: `jf rt repo-template` is interactive and cannot be used by agents.
|
|
14
|
+
2. Create: `jf rt repo-create <template.json>`
|
|
15
|
+
3. Update: `jf rt repo-update <template.json>`
|
|
16
|
+
4. Delete: `jf rt repo-delete <repo-pattern> --quiet`
|
|
17
|
+
|
|
18
|
+
To list repositories, use:
|
|
19
|
+
`jf api /artifactory/api/repositories`
|
|
20
|
+
|
|
21
|
+
## File operations
|
|
22
|
+
|
|
23
|
+
- Upload: `jf rt upload <source> <target>`
|
|
24
|
+
- Download: `jf rt download <source> [target]`
|
|
25
|
+
- Search: `jf rt search <pattern>`
|
|
26
|
+
- Move: `jf rt move <source> <target>`
|
|
27
|
+
- Copy: `jf rt copy <source> <target>`
|
|
28
|
+
- Delete: `jf rt delete <pattern>`
|
|
29
|
+
- Set properties: `jf rt set-props <pattern> "key=value"`
|
|
30
|
+
- Delete properties: `jf rt delete-props <pattern> "key"`
|
|
31
|
+
|
|
32
|
+
### Searching across repositories
|
|
33
|
+
|
|
34
|
+
`jf rt search` expects a `<repo>/<pattern>` argument. When the repo is unknown,
|
|
35
|
+
agents tend to use a leading wildcard (`jf rt search "*/path/..."`), which
|
|
36
|
+
generates an unscoped AQL internally and can time out on large instances.
|
|
37
|
+
|
|
38
|
+
Use a direct AQL query with `name` and `path` criteria instead — omitting the
|
|
39
|
+
`repo` field searches all accessible repos via indexed columns:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
jf api /artifactory/api/search/aql \
|
|
43
|
+
-X POST -H "Content-Type: text/plain" \
|
|
44
|
+
-d 'items.find({
|
|
45
|
+
"name":"<artifact-filename>",
|
|
46
|
+
"path":"<directory/path/within/repo>"
|
|
47
|
+
}).include("repo","path","name","size","sha256")'
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Add `"repo":"<repo-name>"` to the criteria when the target repo is known, to
|
|
51
|
+
narrow the search further.
|
|
52
|
+
|
|
53
|
+
## Build info
|
|
54
|
+
|
|
55
|
+
**Project scoping rule:** Append `?project=<key>` to **every** build detail
|
|
56
|
+
API call. When the user provides a project key, use it. When no project key
|
|
57
|
+
is provided, use `?project=default` (the built-in default project that covers
|
|
58
|
+
the `artifactory-build-info` repo). For AQL queries, scope by
|
|
59
|
+
`"repo":"<project-key>-build-info"` (or `"repo":"artifactory-build-info"` for
|
|
60
|
+
the default project).
|
|
61
|
+
|
|
62
|
+
**Server rule:** A 404 from a `?project=<key>` build call is **not** a signal
|
|
63
|
+
to try a different server. Use only the resolved server; on any failure,
|
|
64
|
+
report and stop. See `SKILL.md` § *Server selection rules*.
|
|
65
|
+
|
|
66
|
+
### Publishing builds
|
|
67
|
+
|
|
68
|
+
- Collect env: `jf rt build-collect-env <name> <number>`
|
|
69
|
+
- Add git info: `jf rt build-add-git <name> <number>`
|
|
70
|
+
- Publish: `jf rt build-publish <name> <number>`
|
|
71
|
+
- Promote: `jf rt build-promote <name> <number> <target-repo>`
|
|
72
|
+
- Discard: `jf rt build-discard <name>`
|
|
73
|
+
|
|
74
|
+
### Listing build names
|
|
75
|
+
|
|
76
|
+
**Do not use `GET /api/build`** — it has no pagination and times out on large
|
|
77
|
+
instances. Always use AQL with `limit` and `offset`.
|
|
78
|
+
|
|
79
|
+
**All builds** (no project scope):
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
jf api /artifactory/api/search/aql \
|
|
83
|
+
-X POST -H "Content-Type: text/plain" \
|
|
84
|
+
-d 'builds.find().include("name","number","repo","created").sort({"$desc":["created"]}).offset(0).limit(100)'
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Project-scoped** — filter by the project's build-info repository
|
|
88
|
+
(`<project-key>-build-info`, or `artifactory-build-info` for the default
|
|
89
|
+
project):
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
jf api /artifactory/api/search/aql \
|
|
93
|
+
-X POST -H "Content-Type: text/plain" \
|
|
94
|
+
-d 'builds.find({"repo":"<project-key>-build-info"}).include("name","number","repo","created").sort({"$desc":["created"]}).offset(0).limit(100)'
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Pagination:** The response includes a `range` object with `total` (total
|
|
98
|
+
matching records). If `total` exceeds the `limit`, tell the user: *"Showing
|
|
99
|
+
first 100 of N results (paginated). Ask for the next batch if needed."*
|
|
100
|
+
For subsequent pages, increment `offset` by 100.
|
|
101
|
+
|
|
102
|
+
**Output rule (mandatory):** AQL returns one row per name+number pair.
|
|
103
|
+
Extract **unique build names** client-side (e.g.
|
|
104
|
+
`jq '[.[].builds.name] | unique'`). Present **only the deduplicated list of
|
|
105
|
+
build names** to the user. **Do not** include build numbers, timestamps, run
|
|
106
|
+
counts, or any per-run details in the response — not even as a "bonus" or
|
|
107
|
+
"most recent" table. The user is asking "what builds exist", not "what runs
|
|
108
|
+
happened". Only show run-level details if the user explicitly asks for them
|
|
109
|
+
in a follow-up.
|
|
110
|
+
|
|
111
|
+
### Listing runs of a specific build
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
jf api /artifactory/api/search/aql \
|
|
115
|
+
-X POST -H "Content-Type: text/plain" \
|
|
116
|
+
-d 'builds.find({"name":"<build-name>"}).include("name","number","repo","created").sort({"$desc":["created"]}).offset(0).limit(100)'
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Add `"repo":"<project-key>-build-info"` to the criteria when a project key
|
|
120
|
+
is known. Apply the same pagination rules as above.
|
|
121
|
+
|
|
122
|
+
### Retrieving full build info
|
|
123
|
+
|
|
124
|
+
Use the REST detail endpoint for a **single** build run. Always include
|
|
125
|
+
`?project=<key>` (or `?project=default` when no key is provided):
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
jf api "/artifactory/api/build/<name>/<number>?project=<key>"
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
This is the only `/api/build` endpoint that should be used — it returns a
|
|
132
|
+
single record and does not need pagination.
|
|
133
|
+
|
|
134
|
+
### When a build is not found
|
|
135
|
+
|
|
136
|
+
If the detail call returns 404, the build likely belongs to a different
|
|
137
|
+
project. **Ask the user for the project key** rather than searching across
|
|
138
|
+
repos or servers.
|
|
139
|
+
|
|
140
|
+
### Repository listing vs build-info
|
|
141
|
+
|
|
142
|
+
`GET /artifactory/api/repositories?project=<key>&type=buildinfo` may return
|
|
143
|
+
an empty list even when project-scoped build info exists (for example under
|
|
144
|
+
a `*-build-info` repository). Prefer AQL to
|
|
145
|
+
discover builds; do not treat an empty repository
|
|
146
|
+
list as proof that no
|
|
147
|
+
builds exist.
|
|
148
|
+
|
|
149
|
+
## Permissions
|
|
150
|
+
|
|
151
|
+
Permission targets use JSON templates.
|
|
152
|
+
Note: `jf rt permission-target-template` is interactive.
|
|
153
|
+
|
|
154
|
+
- Create: `jf rt permission-target-create <template.json>`
|
|
155
|
+
- Update: `jf rt permission-target-update <template.json>`
|
|
156
|
+
- Delete: `jf rt permission-target-delete <name>`
|
|
157
|
+
|
|
158
|
+
## Users and groups
|
|
159
|
+
|
|
160
|
+
- Create users: `jf rt users-create --csv <file>`
|
|
161
|
+
- Create single user: `jf rt user-create` (check `--help` for options)
|
|
162
|
+
- Delete users: `jf rt users-delete <pattern>`
|
|
163
|
+
- Create group: `jf rt group-create <name>`
|
|
164
|
+
- Delete group: `jf rt group-delete <name>`
|
|
165
|
+
- Add users to group: `jf rt group-add-users <group> <users-list>`
|
|
166
|
+
|
|
167
|
+
To get user details or update users, use `jf api`:
|
|
168
|
+
```
|
|
169
|
+
jf api /access/api/v2/users/<username>
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Replication
|
|
173
|
+
|
|
174
|
+
Replication configs use JSON templates.
|
|
175
|
+
Note: `jf rt replication-template` is interactive.
|
|
176
|
+
|
|
177
|
+
- Create: `jf rt replication-create <template.json>`
|
|
178
|
+
- Delete: `jf rt replication-delete <repo-key>`
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
# Catalog entities
|
|
2
|
+
|
|
3
|
+
When to read this file:
|
|
4
|
+
|
|
5
|
+
- Querying **public package metadata** (descriptions, vulnerabilities, licenses, operational info).
|
|
6
|
+
- Working with the **Custom Catalog** (org-specific labels, package views, federation).
|
|
7
|
+
- Looking up **vulnerability details** beyond what Xray provides (advisories, EPSS, CWE, known exploits).
|
|
8
|
+
- Querying **OpenSSF scorecards**, **ML model metadata**, or **MCP service** registries.
|
|
9
|
+
- Using the OneModel GraphQL API with `publicPackages`, `customPackages`,
|
|
10
|
+
`publicSecurityInfo`, `publicLegalInfo`, `publicOperationalInfo`,
|
|
11
|
+
`publicCatalogLabels`, or `publicRemoteServices` query roots.
|
|
12
|
+
|
|
13
|
+
Catalog entities are accessed via the **OneModel GraphQL API**
|
|
14
|
+
(`/onemodel/api/v1/graphql`).
|
|
15
|
+
|
|
16
|
+
For the OneModel query workflow (credentials, schema fetch, validation,
|
|
17
|
+
execution), read `references/onemodel-graphql.md`.
|
|
18
|
+
|
|
19
|
+
## Two catalog layers
|
|
20
|
+
|
|
21
|
+
| Layer | Scope | Description |
|
|
22
|
+
|-------|-------|-------------|
|
|
23
|
+
| **Public Catalog** | Global | JFrog's curated package database — security, legal, and operational metadata for public packages across ecosystems |
|
|
24
|
+
| **Custom Catalog** | Organization | Org-specific overlay — custom labels, per-org package views, federation config |
|
|
25
|
+
|
|
26
|
+
The Custom Catalog builds on top of the Public Catalog. A public package
|
|
27
|
+
can be enriched with org-specific labels and metadata through the Custom
|
|
28
|
+
Catalog without altering the underlying public data.
|
|
29
|
+
|
|
30
|
+
## Public Catalog entities
|
|
31
|
+
|
|
32
|
+
### PublicPackage
|
|
33
|
+
|
|
34
|
+
A package as known to JFrog's global package database.
|
|
35
|
+
|
|
36
|
+
| Field | Description |
|
|
37
|
+
|-------|-------------|
|
|
38
|
+
| `name` | Package name (e.g. `lodash`, `spring-boot-starter-web`) |
|
|
39
|
+
| `type` | Package type (e.g. `npm`, `maven`, `pypi`) |
|
|
40
|
+
| `ecosystem` | Ecosystem identifier |
|
|
41
|
+
| `description` | Rich-text description |
|
|
42
|
+
| `homepage`, `vcsUrl` | Package URLs |
|
|
43
|
+
| `vendor` | Maintainer or organization |
|
|
44
|
+
| `latestVersion` | Most recent version |
|
|
45
|
+
| `trendingScore` | Popularity score |
|
|
46
|
+
| `publishedAt`, `modifiedAt` | Timestamps |
|
|
47
|
+
| `mlModel` | ML model metadata (for HuggingFace etc.) |
|
|
48
|
+
|
|
49
|
+
Connections: `versionsConnection`, `publicLabelsConnection`, `legalInfo`,
|
|
50
|
+
`operationalInfo`, `securityInfo`.
|
|
51
|
+
|
|
52
|
+
Query: `publicPackages.searchPackages(where: {...})`.
|
|
53
|
+
|
|
54
|
+
### PublicPackageVersion
|
|
55
|
+
|
|
56
|
+
A specific version with security, legal, and operational analysis.
|
|
57
|
+
|
|
58
|
+
| Field | Description |
|
|
59
|
+
|-------|-------------|
|
|
60
|
+
| `version` | Version string |
|
|
61
|
+
| `isLatest` | Whether this is the latest version |
|
|
62
|
+
| `isListedVersion` | Whether visible in Catalog UI |
|
|
63
|
+
| `publishedAt`, `modifiedAt` | Timestamps |
|
|
64
|
+
| `trendingScore` | Version-level popularity |
|
|
65
|
+
| `dependencies` | Dependency information |
|
|
66
|
+
| `mlModelMetadata`, `mlInfo` | ML/AI-related metadata |
|
|
67
|
+
|
|
68
|
+
Each version carries three info blocks:
|
|
69
|
+
- `securityInfo` — vulnerability data, maliciousness, contextual analysis
|
|
70
|
+
- `legalInfo` — licenses, copyrights
|
|
71
|
+
- `operationalInfo` — end-of-life, OpenSSF scores, popularity metrics
|
|
72
|
+
|
|
73
|
+
### PublicVulnerability
|
|
74
|
+
|
|
75
|
+
Vulnerability data richer than what Xray violations expose. Useful for
|
|
76
|
+
deep-dive security analysis and advisory lookups.
|
|
77
|
+
|
|
78
|
+
| Field | Description |
|
|
79
|
+
|-------|-------------|
|
|
80
|
+
| `name` | CVE identifier (e.g. `CVE-2021-44228`) |
|
|
81
|
+
| `ecosystem` | Affected ecosystem |
|
|
82
|
+
| `severity` | `CRITICAL`, `HIGH`, `MEDIUM`, `LOW` |
|
|
83
|
+
| `description` | Detailed impact description |
|
|
84
|
+
| `cvss` | CVSS scores — v2, v3, **and v4** |
|
|
85
|
+
| `epss` | EPSS (Exploit Prediction Scoring System) — exploit likelihood |
|
|
86
|
+
| `knownExploit` | Known exploit information |
|
|
87
|
+
| `withdrawn` | Whether the CVE has been retracted |
|
|
88
|
+
| `aliases` | Alternative identifiers |
|
|
89
|
+
| `references` | Advisory URLs |
|
|
90
|
+
| `publishedAt`, `modifiedAt` | Timestamps |
|
|
91
|
+
|
|
92
|
+
Advisory sources (via `advisories` connection):
|
|
93
|
+
- **NVD** — NIST National Vulnerability Database
|
|
94
|
+
- **GHSA** — GitHub Security Advisory
|
|
95
|
+
- **JFrog Advisory** — JFrog's own research (includes impact reasons)
|
|
96
|
+
- **Debian Security Tracker**
|
|
97
|
+
- **RedHat OVAL**
|
|
98
|
+
|
|
99
|
+
Additional connections: `cwesConnection` (CWE entries), `cpesConnection`
|
|
100
|
+
(CPE entries), `publicPackageInfo` (affected packages and versions).
|
|
101
|
+
|
|
102
|
+
Query: `publicSecurityInfo.searchVulnerabilities(where: {...})`.
|
|
103
|
+
|
|
104
|
+
#### Filtering limitations
|
|
105
|
+
|
|
106
|
+
`searchVulnerabilities` can filter by CVE name, ecosystem, severity, CVSS,
|
|
107
|
+
EPSS, known exploit status, and publication date — but **not** by affected
|
|
108
|
+
package name. There is no `hasPublicPackageInfoWith` or similar filter on
|
|
109
|
+
`PublicVulnerabilityWhereInput`. To find vulnerabilities affecting a specific
|
|
110
|
+
package, use one of these alternatives:
|
|
111
|
+
|
|
112
|
+
- **Version-level security info** (GraphQL): query
|
|
113
|
+
`publicPackages.getPackage(type, name)` and navigate to
|
|
114
|
+
`versionsConnection → securityInfo → vulnerabilitiesConnection` to get
|
|
115
|
+
CVEs affecting specific versions.
|
|
116
|
+
- **Individual CVE lookup**: use `searchVulnerabilities(where: { name: "<CVE>" })`
|
|
117
|
+
and inspect `publicPackageInfo.vulnerablePublicPackagesConnection` on the
|
|
118
|
+
`generic` ecosystem entry.
|
|
119
|
+
|
|
120
|
+
#### Ecosystem multiplicity
|
|
121
|
+
|
|
122
|
+
A single CVE appears as multiple `PublicVulnerability` entries — one per
|
|
123
|
+
ecosystem. The `ecosystem` field determines which entry you see:
|
|
124
|
+
|
|
125
|
+
| Ecosystem | Contains |
|
|
126
|
+
|-----------|----------|
|
|
127
|
+
| `generic` | Non-OS package-level data (npm, maven, pypi, go, etc.) — includes `publicPackageInfo` with vulnerable versions and fix versions |
|
|
128
|
+
| `debian`, `redhat`, `ubuntu`, etc. | OS-specific advisory data — severity may differ from NVD; `publicPackageInfo` is typically empty (OS packages are tracked separately) |
|
|
129
|
+
|
|
130
|
+
When looking up a CVE by name, `searchVulnerabilities(where: { name: "<CVE>" })`
|
|
131
|
+
returns all ecosystem entries. To get affected packages and fix versions for
|
|
132
|
+
libraries like npm or maven, filter for or focus on the `generic` ecosystem
|
|
133
|
+
entry. `getVulnerability` requires both `name` and `ecosystem` — use
|
|
134
|
+
`searchVulnerabilities` when the ecosystem is unknown.
|
|
135
|
+
|
|
136
|
+
### PublicLicense
|
|
137
|
+
|
|
138
|
+
License metadata with permission, condition, and limitation details.
|
|
139
|
+
|
|
140
|
+
| Field | Description |
|
|
141
|
+
|-------|-------------|
|
|
142
|
+
| `name` | License name (e.g. `Apache-2.0`, `MIT`) |
|
|
143
|
+
| `spdxId` | SPDX identifier |
|
|
144
|
+
| `permissions` | What the license permits |
|
|
145
|
+
| `limitations` | Restrictions imposed |
|
|
146
|
+
| `patentConditions` | Patent grant conditions |
|
|
147
|
+
| `noticeFiles` | Required notices |
|
|
148
|
+
|
|
149
|
+
Query: `publicLegalInfo.searchLicenses(where: {...})`.
|
|
150
|
+
|
|
151
|
+
### PublicPackageOperationalInfo
|
|
152
|
+
|
|
153
|
+
Operational risk assessment for packages and versions.
|
|
154
|
+
|
|
155
|
+
| Entity | Key data |
|
|
156
|
+
|--------|----------|
|
|
157
|
+
| **OpenSSF scorecard** | Overall score, individual checks with scores and pass/fail |
|
|
158
|
+
| **End-of-life** | Whether the package or version is EOL, justification |
|
|
159
|
+
| **Popularity** | JFrog popularity by segment and subscription tier, download counts |
|
|
160
|
+
|
|
161
|
+
### MCP services and tools
|
|
162
|
+
|
|
163
|
+
The Public Catalog also indexes MCP (Model Context Protocol) services:
|
|
164
|
+
|
|
165
|
+
| Entity | Description |
|
|
166
|
+
|--------|-------------|
|
|
167
|
+
| `PublicMcpService` | An MCP service with name, description, version |
|
|
168
|
+
| `PublicMcpTool` | A tool exposed by an MCP service with arguments |
|
|
169
|
+
| `PublicMcpRemote` | Remote MCP server configuration |
|
|
170
|
+
|
|
171
|
+
Query: `publicRemoteServices.searchMcpServices(where: {...})`.
|
|
172
|
+
|
|
173
|
+
## Custom Catalog entities
|
|
174
|
+
|
|
175
|
+
### CustomPackage
|
|
176
|
+
|
|
177
|
+
A package in the organization's private catalog view.
|
|
178
|
+
|
|
179
|
+
| Field | Description |
|
|
180
|
+
|-------|-------------|
|
|
181
|
+
| `customCatalogId` | Org-scoped identifier |
|
|
182
|
+
| `name`, `type`, `ecosystem`, `namespace` | Package identity |
|
|
183
|
+
| `isListedPackage` | Whether visible in Catalog UI |
|
|
184
|
+
| `customCatalogAddedAt`, `customCatalogModifiedAt` | Org-specific timestamps |
|
|
185
|
+
|
|
186
|
+
Connections: `versionsConnection`, `legalInfo`,
|
|
187
|
+
`customCatalogLabelsConnection`.
|
|
188
|
+
|
|
189
|
+
### CustomCatalogLabel
|
|
190
|
+
|
|
191
|
+
Organization-defined labels for categorizing packages.
|
|
192
|
+
|
|
193
|
+
| Field | Description |
|
|
194
|
+
|-------|-------------|
|
|
195
|
+
| `name` | Label name |
|
|
196
|
+
| `description` | What the label represents |
|
|
197
|
+
| `color` | Display color |
|
|
198
|
+
| `labelType` | `MANUAL` or `AUTOMATIC` |
|
|
199
|
+
| `assignmentInfo` | How and when the label was assigned |
|
|
200
|
+
|
|
201
|
+
Labels can be assigned to both custom packages and public packages/versions
|
|
202
|
+
within the org's catalog scope. The Custom Catalog mutations allow
|
|
203
|
+
creating, updating, and deleting labels.
|
|
204
|
+
|
|
205
|
+
### CustomCatalogFederation
|
|
206
|
+
|
|
207
|
+
Configuration for federating catalog data across JFrog deployments.
|
|
208
|
+
|
|
209
|
+
## Catalog vs. Xray vs. Stored Packages
|
|
210
|
+
|
|
211
|
+
These three domains provide different views of package and security data:
|
|
212
|
+
|
|
213
|
+
| Aspect | Catalog | Xray | Stored Packages |
|
|
214
|
+
|--------|---------|------|-----------------|
|
|
215
|
+
| **Scope** | Global knowledge base + org overlay | Instance-scoped scanning | Instance-scoped storage |
|
|
216
|
+
| **Security** | CVE advisories, EPSS, CVSS v2/v3/v4, known exploits | Watches, policies, violations | Vulnerability summary (deprecated) |
|
|
217
|
+
| **Packages** | Public metadata (description, homepage, OpenSSF) | Components identified during scanning | Packages/versions stored in Artifactory |
|
|
218
|
+
| **Access** | GraphQL only | REST + CLI (`jf api /xray/...`) | GraphQL only |
|
|
219
|
+
| **Use case** | Research, compliance reporting, package evaluation | Runtime enforcement, CI/CD gating | Inventory, location queries |
|