Skip to content

Commit

Permalink
chg: [FediVuln-Publish] Added templates for vulnerability, comment, a…
Browse files Browse the repository at this point in the history
…nd bundle.
  • Loading branch information
cedricbonhomme committed Dec 5, 2024
1 parent 4623560 commit 985f1eb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions fedivuln/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@
)


# ### Templates

TEMPLATES = {
"vulnerability": "You can now share your thoughts on vulnerability "
"<VULNID> in Vulnerability-Lookup:\n<LINK>\n\n#VulnerabilityLookup #Vulnerability",
"comment": "Vulnerability <VULNID> has received a comment on "
"Vulnerability-Lookup:\n<LINK>\n\n#VulnerabilityLookup #Vulnerability",
"bundle": "A new bundle of vulnerabilities has been published "
"on Vulnerability-Lookup:\n<LINK>\n\n#VulnerabilityLookup #Vulnerability",
}


# ### Streaming functions


def publish(message):
mastodon.status_post(message)

Expand Down Expand Up @@ -66,6 +81,7 @@ def listen_to_http_event_stream(url, headers=None, params=None):


def main():
# Point of entry in execution mode
parser = argparse.ArgumentParser(prog="FediVuln-Publish")
parser.add_argument(
"-t",
Expand Down

0 comments on commit 985f1eb

Please sign in to comment.