generated from oracle/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Added integration test using a previous false-positive, ajax-re…
…quester, which now does not report a false-positive
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
tests/integration/cases/ajax-requester_pypi_malware_analyzer/policy.dl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* Copyright (c) 2024 - 2024, Oracle and/or its affiliates. All rights reserved. */ | ||
/* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/. */ | ||
|
||
#include "prelude.dl" | ||
|
||
Policy("check-ajax-requester", component_id, "Check ajax-requester artifacts") :- | ||
check_passed(component_id, "mcn_detect_malicious_metadata_1"). | ||
|
||
apply_policy_to("check-ajax-requester", component_id) :- | ||
is_component(component_id, purl), | ||
match("pkg:pypi/ajax-requester", purl). |
22 changes: 22 additions & 0 deletions
22
tests/integration/cases/ajax-requester_pypi_malware_analyzer/test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright (c) 2024 - 2024, Oracle and/or its affiliates. All rights reserved. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/. | ||
|
||
description: | | ||
Analyzing the metadata of a project with unreachable links, frequent releases, and the maintainer | ||
released it shortly after account registration with a suspicious setup.py file, but a wheel file | ||
is present. Macaron should report a pass for such a package. | ||
tags: | ||
- macaron-python-package | ||
|
||
steps: | ||
- name: Run macaron analyze against ajax-requester | ||
kind: analyze | ||
options: | ||
command_args: | ||
- -purl | ||
- pkg:pypi/ajax-requester | ||
- name: Run macaron verify-policy to check the results | ||
kind: verify | ||
options: | ||
policy: policy.dl |