From 5c219adbe036639f6b332f1cae0339e9dd29065d Mon Sep 17 00:00:00 2001 From: ethanae Date: Fri, 2 Aug 2024 14:54:47 +0200 Subject: [PATCH 1/3] - add spamvertised schema --- .../development/spamvertised_sample.json | 32 +++++++++++++ schemas/development/spamvertised.schema.json | 45 +++++++++++++++++++ schemas/development/xarf.schema.json | 3 ++ 3 files changed, 80 insertions(+) create mode 100644 samples/positive/development/spamvertised_sample.json create mode 100644 schemas/development/spamvertised.schema.json diff --git a/samples/positive/development/spamvertised_sample.json b/samples/positive/development/spamvertised_sample.json new file mode 100644 index 0000000..0235bb5 --- /dev/null +++ b/samples/positive/development/spamvertised_sample.json @@ -0,0 +1,32 @@ +{ + "Version": "development", + "ReporterInfo": { + "ReporterOrg": "ExampleOrg", + "ReporterOrgDomain": "example.com", + "ReporterOrgEmail": "reports@example.com", + "ReporterContactEmail": "contact@example.com", + "ReporterContactName": "Mr. Example", + "ReporterContactPhone": "+ 01 000 1234567" + }, + "Disclosure": true, + "Report": { + "ReportClass": "Activity", + "ReportType": "Spamvertised", + "Date": "2024-08-03T14:17:10Z", + "SourceIp": "192.0.2.55", + "SourcePort": 54321, + "SourceUrl": "http://bad-spamvertised.spam", + "DestinationIp": "198.51.100.33", + "DestinationPort": 25, + "SmtpMailFromAddress": "spamvertised@example.com", + "SmtpRcptToAddress": "victim@example.com", + "Samples": [ + { + "ContentType": "message/rfc822", + "Base64Encoded": true, + "Description": "The spamvertised mail", + "Payload": "bWFpbA==" + } + ] + } +} diff --git a/schemas/development/spamvertised.schema.json b/schemas/development/spamvertised.schema.json new file mode 100644 index 0000000..514f5fa --- /dev/null +++ b/schemas/development/spamvertised.schema.json @@ -0,0 +1,45 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://raw.githubusercontent.com/xarf/schema-discussion/master/schemas/development/spamvertised.schema.json", + "title": "XARF SPAMVERTISED", + "description": "A format to report SPAMVERTISED events.", + "allOf": [ + { + "$ref": "xarf_shared.schema.json#/properties/XarfBase" + }, + { + "type": "object", + "properties": { + "Report": { + "allOf": [ + { + "$ref": "xarf_shared.schema.json#/properties/IpAndUrlBasedReport" + }, + { + "type": "object", + "properties": { + "ReportClass": { + "type": "string", + "enum": ["Activity"] + }, + "ReportType": { + "type": "string", + "enum": ["Spamvertised"] + } + } + }, + { + "$ref": "xarf_shared.schema.json#/properties/WithDestination" + }, + { + "$ref": "xarf_shared.schema.json#/properties/CommonProps" + }, + { + "$ref": "xarf_shared.schema.json#/properties/EMail" + } + ] + } + } + } + ] +} diff --git a/schemas/development/xarf.schema.json b/schemas/development/xarf.schema.json index c91fcf2..98ce762 100644 --- a/schemas/development/xarf.schema.json +++ b/schemas/development/xarf.schema.json @@ -51,6 +51,9 @@ }, { "$ref": "harassment.schema.json" + }, + { + "$ref": "spamvertised.schema.json" } ] } From 066a64c3d004bc8ea581c6c00198cb48360b3224 Mon Sep 17 00:00:00 2001 From: ethanae Date: Mon, 5 Aug 2024 15:31:47 +0200 Subject: [PATCH 2/3] - add negative development spamvertised sample --- .../invalid_url_and_ip_spamvertised.json | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 samples/negative/development/invalid_url_and_ip_spamvertised.json diff --git a/samples/negative/development/invalid_url_and_ip_spamvertised.json b/samples/negative/development/invalid_url_and_ip_spamvertised.json new file mode 100644 index 0000000..0f4a065 --- /dev/null +++ b/samples/negative/development/invalid_url_and_ip_spamvertised.json @@ -0,0 +1,32 @@ +{ + "Version": "development", + "ReporterInfo": { + "ReporterOrg": "ExampleOrg", + "ReporterOrgDomain": "example.com", + "ReporterOrgEmail": "reports@example.com", + "ReporterContactEmail": "contact@example.com", + "ReporterContactName": "Mr. Example", + "ReporterContactPhone": "+ 01 000 1234567" + }, + "Disclosure": true, + "Report": { + "ReportClass": "Activity", + "ReportType": "Spamvertised", + "Date": "2024-08-03T14:17:10Z", + "SourceIp": "http://bad-spamvertised.spam", + "SourcePort": 54321, + "SourceUrl": "192.0.2.55", + "DestinationIp": "198.51.100.33", + "DestinationPort": 25, + "SmtpMailFromAddress": "spamvertised@example.com", + "SmtpRcptToAddress": "victim@example.com", + "Samples": [ + { + "ContentType": "message/rfc822", + "Base64Encoded": true, + "Description": "The spamvertised mail", + "Payload": "bWFpbA==" + } + ] + } +} From b14251f0b9b90b228db07959ea4d228c29797be5 Mon Sep 17 00:00:00 2001 From: ethanae Date: Tue, 6 Aug 2024 14:16:58 +0200 Subject: [PATCH 3/3] - codecov: fail_ci_if_error: false --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f12b64c..757ca82 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -113,6 +113,6 @@ jobs: name: coverage - uses: codecov/codecov-action@v4 with: - fail_ci_if_error: true # optional (default = false) + fail_ci_if_error: false # optional (default = false) verbose: true # optional (default = false) token: ${{ secrets.CODECOV_TOKEN }}