Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Spamvertised schema #66

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
32 changes: 32 additions & 0 deletions samples/negative/development/invalid_url_and_ip_spamvertised.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"Version": "development",
"ReporterInfo": {
"ReporterOrg": "ExampleOrg",
"ReporterOrgDomain": "example.com",
"ReporterOrgEmail": "[email protected]",
"ReporterContactEmail": "[email protected]",
"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": "[email protected]",
"SmtpRcptToAddress": "[email protected]",
"Samples": [
{
"ContentType": "message/rfc822",
"Base64Encoded": true,
"Description": "The spamvertised mail",
"Payload": "bWFpbA=="
}
]
}
}
32 changes: 32 additions & 0 deletions samples/positive/development/spamvertised_sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"Version": "development",
"ReporterInfo": {
"ReporterOrg": "ExampleOrg",
"ReporterOrgDomain": "example.com",
"ReporterOrgEmail": "[email protected]",
"ReporterContactEmail": "[email protected]",
"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": "[email protected]",
"SmtpRcptToAddress": "[email protected]",
"Samples": [
{
"ContentType": "message/rfc822",
"Base64Encoded": true,
"Description": "The spamvertised mail",
"Payload": "bWFpbA=="
}
]
}
}
45 changes: 45 additions & 0 deletions schemas/development/spamvertised.schema.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
}
}
]
}
3 changes: 3 additions & 0 deletions schemas/development/xarf.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
},
{
"$ref": "harassment.schema.json"
},
{
"$ref": "spamvertised.schema.json"
}
]
}
Loading