mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-24 20:28:06 +02:00
refactor(dynamic): improve SSA receiver type checks, enhance framework bindings, and expand test coverage
This commit is contained in:
parent
f7310b20ba
commit
3027c1afa7
9 changed files with 583 additions and 56 deletions
|
|
@ -343,6 +343,14 @@ def handler(envelope):\n validate_request(envelope)\n",
|
|||
"handler",
|
||||
&["validateMessage"],
|
||||
),
|
||||
(
|
||||
Lang::JavaScript,
|
||||
b"const { Consumer } = require('sqs-consumer');\n\
|
||||
function handler(env) {}\n\
|
||||
Consumer.create({ queueUrl: 'http://localhost/q', visibilityTimeout: 30, handleMessage: handler });\n",
|
||||
"handler",
|
||||
&["visibilityTimeout"],
|
||||
),
|
||||
(
|
||||
Lang::Python,
|
||||
b"from google.cloud import pubsub_v1\n\
|
||||
|
|
@ -379,6 +387,19 @@ def on_message(ch, method, properties, body):\n validate_request(body)\n",
|
|||
"onMessage",
|
||||
&["ValidatingMessageConverter"],
|
||||
),
|
||||
(
|
||||
Lang::Java,
|
||||
b"import org.springframework.amqp.rabbit.annotation.RabbitListener;\n\
|
||||
public class Vuln {\n\
|
||||
@RabbitListener(queues = \"work\")\n\
|
||||
public void onMessage(String body) {}\n\
|
||||
public void configure(Factory factory) {\n\
|
||||
factory.setCommonErrorHandler(new DefaultErrorHandler());\n\
|
||||
}\n\
|
||||
}\n",
|
||||
"onMessage",
|
||||
&["DefaultErrorHandler"],
|
||||
),
|
||||
(
|
||||
Lang::Go,
|
||||
b"package entry\n\
|
||||
|
|
@ -386,7 +407,7 @@ def on_message(ch, method, properties, body):\n validate_request(body)\n",
|
|||
func OnMessage(msg *nats.Msg) { ValidatePayload(msg.Data) }\n\
|
||||
func init() { nc.QueueSubscribe(\"events\", \"workers\", OnMessage) }\n",
|
||||
"OnMessage",
|
||||
&["ValidatePayload"],
|
||||
&["ValidatePayload", "QueueSubscribe"],
|
||||
),
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue