Skip to content

Commit 8302a95

Browse files
authored
test: improve deploy spec for pip and add integration test (#1250)
Improves the deployment specification for pip build tool and adds an integration test to validate the deployment workflow. Signed-off-by: behnazh-w <[email protected]>
1 parent 8791027 commit 8302a95

File tree

5 files changed

+70
-1
lines changed

5 files changed

+70
-1
lines changed

docs/source/pages/tutorials/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ For the full list of supported technologies, such as CI services, registries, an
1717
.. toctree::
1818
:maxdepth: 1
1919

20+
source_finder
2021
commit_finder
2122
detect_malicious_package
2223
rebuild_third_party_artifacts
@@ -27,4 +28,3 @@ For the full list of supported technologies, such as CI services, registries, an
2728
generate_verification_summary_attestation
2829
use_verification_summary_attestation
2930
exclude_include_checks
30-
source_finder

src/macaron/config/defaults.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ packager =
293293
build
294294
publisher =
295295
twine
296+
tox
296297
# build-system information.
297298
build_requires =
298299
setuptools
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/* Copyright (c) 2025 - 2025, Oracle and/or its affiliates. All rights reserved. */
2+
/* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/. */
3+
4+
#include "prelude.dl"
5+
6+
Policy("has-hosted-build", component_id, "Require a hosted build and publishing service.") :-
7+
check_passed(component_id, "mcn_build_as_code_1").
8+
9+
apply_policy_to("has-hosted-build", component_id) :-
10+
is_component(component_id, purl),
11+
match("pkg:pypi/arrow.*", purl).
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"passed_policies": [],
3+
"component_satisfies_policy": [
4+
[
5+
"2",
6+
"pkg:pypi/[email protected]",
7+
"has-hosted-build"
8+
]
9+
],
10+
"failed_policies": [
11+
[
12+
"has-hosted-build"
13+
]
14+
],
15+
"component_violates_policy": [
16+
[
17+
"1",
18+
"pkg:pypi/[email protected]",
19+
"has-hosted-build"
20+
]
21+
]
22+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Copyright (c) 2025 - 2025, Oracle and/or its affiliates. All rights reserved.
2+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.
3+
4+
description: |
5+
Analyzing two versions of a PyPI package to show the usefulness of being able to analyze a repository at multiple stages,
6+
thereby allowing for a more accurate analysis when investigating artifacts that are, or use, outdated libraries.
7+
8+
tags:
9+
- macaron-python-package
10+
- tutorial
11+
12+
steps:
13+
- name: Run macaron analyze on an old version of arrow.
14+
kind: analyze
15+
options:
16+
command_args:
17+
- -purl
18+
- pkg:pypi/[email protected]
19+
- name: Run macaron analyze on a more recent version of arrow.
20+
kind: analyze
21+
options:
22+
command_args:
23+
- -purl
24+
- pkg:pypi/[email protected]
25+
- name: Run macaron verify-policy.
26+
kind: verify
27+
options:
28+
policy: policy.dl
29+
expect_fail: true
30+
- name: Compare verify policy result
31+
kind: compare
32+
options:
33+
kind: policy_report
34+
result: output/policy_report.json
35+
expected: policy_report.json

0 commit comments

Comments
 (0)