- Inconsistent input
nameis trimmed of whitespace viaxargsbutgreetingis not. Either both inputs should be trimmed or neither should, and the choice should be documented.sanitisation xargstrimming isecho "${name}" | xargscan silently collapse multi-word names with special characters (e.g."O'Brien"will cause a parse error). Prefer parameter expansion orsed, both of which are quote-safe.fragile- Stdout echo is redundant
echo "${message}"at the end writes to stdout as well as$GITHUB_OUTPUT. This is harmless but callers should not rely on stdout. Document the intent or remove it.misleading noise - No validation of
an empty string is accepted and produces, World!. Add a guard consistent with thenamecheck, or document explicitly that an empty greeting is valid.greeting
This file contains hidden or 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
| """DNS proxy server that resolves Pokemon type queries via the PokeAPI.""" | |
| import socketserver | |
| import requests | |
| from dnslib import DNSHeader, DNSRecord, QTYPE, RR, TXT | |
| # Configuration | |
| API_URL = "https://pokeapi.co/api/v2" | |
| DNS_DOMAIN_SUFFIX = ["pokemon", "api2dns", "simonpainter", "com"] |
This file contains hidden or 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
| provider "azurerm" { | |
| features {} | |
| subscription_id = var.subscription_id | |
| client_id = var.client_id | |
| client_secret = var.client_secret | |
| tenant_id = var.tenant_id | |
| } | |
| # Bootstrap scripts for VMs | |
| locals { |
This file contains hidden or 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
| $marshaler = new Marshaler(); | |
| $UpdateExpression = " | |
| SET #subscribers = list_append(if_not_exists(#subscribers, :empty_list), :subscriber) | |
| "; | |
| $ConditionExpression = " | |
| NOT contains (#subscribers,:subscriberStr) | |
| "; |
This file contains hidden or 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
| from netaddr import IPNetwork, cidr_merge | |
| import re, sys | |
| try: | |
| filename = sys.argv[1] | |
| except: | |
| print("Please specify a file name for input") | |
| sys.exit() | |
| with open (filename, "r") as file: | |
| table = file.read().replace('\n', '') |
This file contains hidden or 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
| import json,uuid,time | |
| import boto3 | |
| zone = 'XXXXXXXXXXXX' | |
| def lambda_handler(event, context): | |
| if ((event['name'] == "api") or (event['name'] == "www") or (event['name'] == "")): | |
| return { | |
| "statusCode": 403, |
This file contains hidden or 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
| import json, uuid, time | |
| import boto3 | |
| zone = 'XXXXXXXXXXXXX' | |
| def lambda_handler(event, context): | |
| dynamodb = boto3.client('dynamodb') | |
| if ((event['name'] == "api") or (event['name'] == "*") or (event['name'] == "www") or (event['name'] == "")): | |
| return { |
This file contains hidden or 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
| import requests, urllib | |
| class Forecast: | |
| def __init__(self,apikey): | |
| self.apikey=apikey | |
| self.parameters={} | |
| self.timeparam="" | |
| def get(self,latitude,longitude): | |
| self.latitude = latitude | |
| self.longitude = longitude | |
| self.encodedparameters = urllib.urlencode(self.parameters) |
This file contains hidden or 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
| class MakerTrigger(object): | |
| def __init__(self,key,trigger): | |
| self.key = key | |
| self.trigger = trigger | |
| self.maker = “https://maker.ifttt.com/trigger/” + self.trigger + “/with/key/” + self.key | |
| def alert(self,value1=0,value2=0,value3=0): | |
| self.value1 = value1 | |
| self.value2 = value2 | |
| self.value3 = value3 | |
| self.json={“value1”: self.value1, “value2”: self.value2, “value3”: self.value3} |