Skip to content

Commit

Permalink
Merge pull request #452 from Privado-Inc/dev
Browse files Browse the repository at this point in the history
Release PR
  • Loading branch information
khemrajrathore authored May 2, 2024
2 parents 1341c1a + 95407e6 commit afb4ce2
Show file tree
Hide file tree
Showing 15 changed files with 169 additions and 3 deletions.
30 changes: 30 additions & 0 deletions rules/sinks/leakages/logs/php.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
sinks:
- id: Leakages.Log.Critical
name: Log Critical
patterns:
- "(?i).*(?:log|logger)->.*(?:emergency|alert|critical).*"
tags:

- id: Leakages.Log.Error
name: Log Error
patterns:
- "(?i).*(?:log|logger)->.*(?:error).*"
tags:

- id: Leakages.Log.Warn
name: Log Warn
patterns:
- "(?i).*(?:log|logger)->.*(?:warning).*"
tags:

- id: Leakages.Log.Debug
name: Log Debug
patterns:
- "(?i).*(?:log|logger)->.*(?:debug).*"
tags:

- id: Leakages.Log.Info
name: Log Info
patterns:
- "(?i).*(?:log|logger)->.*(?:info|notice).*"
tags:
1 change: 1 addition & 0 deletions rules/sinks/storages/cassandra/java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ sinks:
- apache.org
patterns:
- "(?i).*(?:CassandraConnector|Cluster[.]builder|com[.]datastax[.]oss|com[.]datastax[.]driver[.]core|com[.]noorq[.]casser|org[.]eclipse[.]jnosql[.]mapping[.]cassandra).*"
- "org.apache.flink.streaming.connectors.cassandra.CassandraSink.addSink.*"
tags:
18 changes: 18 additions & 0 deletions rules/sinks/storages/doctrine/php.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

# Sink Rules for Doctrine DB Interface

sinks:
- id: Storages.Doctrine.Interface.Initialize
name: Doctrine Interface (Initialize)
domains:
- www.doctrine-project.org
patterns:
- "(?i).*(?:Doctrine\\\\ORM\\\\EntityManager).*(__construct)"

- id: Storages.Doctrine.Interface.ReadAndWrite
name: Doctrine Interface (Read and Write)
domains:
- www.doctrine-project.org
patterns:
- "(?i).*(?:Doctrine\\\\ORM\\\\EntityManager).*(getConnection|getMetadataFactory|getExpressionBuilder|beginTransaction|transactional|commit|rollback|getClassMetadata|createQuery|createNamedQuery|createNativeQuery|createNamedNativeQuery|createQueryBuilder|flush|find|getReference|getPartialReference|clear|close|persist|remove|refresh|detach|merge|copy|lock|getEventManager|create|insert|delete)"
tags:
1 change: 1 addition & 0 deletions rules/sinks/storages/dynamodb/java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ sinks:
- amazon.com
patterns:
- "(?i)((?:com[.]amazonaws[.]services[.]dynamodbv2[.]((AmazonDynamoDB|AmazonDynamoDBAsyncClient|AmazonDynamoDBClient|AbstractAmazonDynamoDB|AbstractAmazonDynamoDBAsync|document[.]Table)[.]((batchWrite|delete|put|update)Item|transactWriteItems)[:].*))|(?:com[.]amazonaws[.]services[.]dynamodbv2[.]datamodeling[.]DynamoDBMapper[.](batchWrite|delete|save|transactionWrite)[:].*))"
- "org.apache.flink.connector.dynamodb.sink.DynamoDbSink.builder.*"
tags:
5 changes: 3 additions & 2 deletions rules/sinks/storages/elasticsearch/java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ sinks:
domains:
- elastic.co
patterns:
- "(?i).*(?:org[.]opensearch[.](action|client)|org[.]elasticsearch[.]client[.]|org[.]eclipse[.]jnosql[.]mapping[.]elasticsearch).*(?:get|list|head|select|view|find|search|match).*"
- "(?i).*(?:org[.]elasticsearch[.]client[.]|org[.]eclipse[.]jnosql[.]mapping[.]elasticsearch).*(?:get|list|head|select|view|find|search|match).*"
tags:

- id: Storages.Elasticsearch.Write
name: Elasticsearch(Write)
domains:
- elastic.co
patterns:
- "(?i).*(?:org[.]opensearch[.](action|client)|org[.]elasticsearch[.]client[.]|org[.]eclipse[.]jnosql[.]mapping[.]elasticsearch).*(?:add|copy|apply|create|delete|modify|remove|reset|restore|insert|drop|rename|save|set|update|bulkWrite).*"
- "(?i).*(?:org[.]elasticsearch[.]client[.]|org[.]eclipse[.]jnosql[.]mapping[.]elasticsearch).*(?:add|copy|apply|create|delete|modify|remove|reset|restore|insert|drop|rename|save|set|update|bulkWrite).*"
- "org.apache.flink.connector.elasticsearch.sink.Elasticsearch.SinkBuilder.*"
tags:
1 change: 1 addition & 0 deletions rules/sinks/storages/jdbc/java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ sinks:
- oracle.com
patterns:
- "(?i)((java[.]sql[.](Statement|PreparedStatement)[.](executeUpdate|executeLargeUpdate).*)|(org[.]springframework[.]jdbc[.]core[.]JdbcTemplate[.].*update[:].*))"
- "org.apache.flink.connector.jdbc.sink.JdbcSink.builder.*"
tags:

- id: Storages.SpringFramework.Jdbc.Read
Expand Down
1 change: 1 addition & 0 deletions rules/sinks/storages/kinesis/java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ sinks:
- amazon.com
patterns:
- "(?i).*(?:KinesisAsyncClient|KinesisClient|software.amazon.awssdk.services.kinesis).*(add|create|delete|merge|put|remove|update|set|send).*"
- "org.apache.flink.connector.kinesis.sink.KinesisStreamsSink.builder.*"
tags:
18 changes: 18 additions & 0 deletions rules/sinks/storages/laravel/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

# Sink Rules for Laravel DB Facade

sinks:
- id: Storages.Laravel.Facade.Initialize
name: Laravel Facade (Initialize)
domains:
- laravel.com
patterns:
- "(?i).*(?:Illuminate\\\\Support\\\\Facades\\\\DB).*(connection)"

- id: Storages.Laravel.Facade.ReadAndWrite
name: Laravel Facade (Read and Write)
domains:
- laravel.com
patterns:
- "(?i).*(?:Illuminate\\\\Support\\\\Facades\\\\DB).*(select|selectResultSets|scalar|insert|prepareBindings|unprepared|statement|delete|update|transaction|commit|begin_transaction|rollBack|table)"
tags:
2 changes: 2 additions & 0 deletions rules/sinks/storages/messagingqueue/java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ sinks:
- apache.com
patterns:
- "(?i).*((org[.]springframework[.]kafka[.]core[.]KafkaTemplate[.](doSend|send|sendAndReceive|convertAndSend|execute|commit|produce|write)[:])|(org[.]apache[.]kafka[.]clients[.]producer[.]KafkaProducer[.](sendOffsetsToTransaction|send|commit|produce|write|sendAsync)[:])|(com[.]salesforce[.]heroku[.]kafka[.]producer[.]HerokuKafkaProducer[.]send[:])|(io[.]lenses[.]kafka[.]client[.]producer[.]Producer[.]send)|(io[.]confluent[.]kafka[.]clients[.]producer[.]KafkaProducer[.]send)|(io[.]quarkus[.]kafka[.]producer[.]KafkaProducer[.]send)).*"
- "(org.apache.flink.connector.kafka.sink.KafkaSink.builder|org.apache.flink.streaming.connectors.kafka.FlinkKafkaProducer).*"
tags:

- id: Messaging.Queue.Kafka.Consumer
Expand All @@ -22,6 +23,7 @@ sinks:
- rabbitmq.com
patterns:
- "(?i).*(org[.]springframework[.]amqp[.]rabbit[.]core[.]RabbitTemplate[.](doSend|send|sendAndReceive|convertAndSend|execute)[:]).*"
- "org.apache.flink.streaming.connectors.rabbitmq.RMQSink.*"
tags:

- id: Messaging.Service.JMS.Producer
Expand Down
1 change: 1 addition & 0 deletions rules/sinks/storages/mongodb/java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ sinks:
- mongodb.com
patterns:
- "(?i)(com[.]mongodb[.](client[.]MongoCollection|DBCollection)[.]((delete|deleteMany|deleteOne|findOneAnd(Delete|Replace|Update)|replace|replaceOne|replaceMany|update|updateOne|updateMany|bulkWrite|insert|insertOne|insertMany)[:].*))"
- "org.apache.flink.connector.mongodb.sink.MongoSink.builder.*"
tags:

- id: Storages.MongoDB.Morphia.Read
Expand Down
26 changes: 26 additions & 0 deletions rules/sinks/storages/mysql/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

# Sink Rules for MySQL

sinks:
- id: Storages.MySQL.Initialize
name: MySQL DB (Initialize)
domains:
- mysql.com
patterns:
- "(?i).*(?:mysqli|mysql).*(construct|connect)"

- id: Storages.MySQL.ReadAndWrite
name: MySQL DB (Read and Write)
domains:
- mysql.com
patterns:
- "(?i).*(?:mysqli|mysql|PDO).*(affected_rows|create_db|drop_db|construct|query|prepare|execute|bindValue|bind_param|setAttribute|store_result|fetch_all|fetch_array|fetch_row|num_fields|num_rows|next_result)"
tags:

- id: Storages.MySQL.ClearResources
name: MySQL DB (Clear resources)
domains:
- mysql.com
patterns:
- "(?i).*(?:mysqli|mysql|PDO).*(free_result|close)"
tags:
21 changes: 21 additions & 0 deletions rules/sinks/storages/opensearch/java.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

# Sink Rules for storage database Elasticsearch - https://www.opensearch.org

sinks:

- id: Storages.Opensearch.Read
name: Opensearch(Read)
domains:
- opensearch.org
patterns:
- "(?i).*(?:org[.]opensearch[.](action|client)).*(?:get|list|head|select|view|find|search|match).*"
tags:

- id: Storages.Opensearch.Write
name: Opensearch(Write)
domains:
- opensearch.org
patterns:
- "(?i).*(?:org[.]opensearch[.](action|client)).*(?:add|copy|apply|create|delete|modify|remove|reset|restore|insert|drop|rename|save|set|update|bulkWrite).*"
- "org.apache.flink.connector.opensearch.sink.OpensearchSinkBuilder.*"
tags:
26 changes: 26 additions & 0 deletions rules/sinks/storages/postgres/php.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

# Sink Rules for PostgreSQL

sinks:
- id: Storages.PostgreSQL.Initialize
name: PostgreSQL DB (Initialize)
domains:
- postgresql.org
patterns:
- "(?i).*(pg_connect|pg_connect_poll|pg_connection).*"

- id: Storages.PostgreSQL.ReadAndWrite
name: PostgreSQL DB (Read and Write)
domains:
- postgresql.org
patterns:
- "(?i).*(pg_query|pg_fetch|pg_field|pg_lo|pg_affected_rows|pg_num|pg_result|pg_set|pg_delete).*"
tags:

- id: Storages.PostgreSQL.ClearResources
name: PostgreSQL DB (Clear resources)
domains:
- postgresql.org
patterns:
- "(?i).*(pg_free_result|pg_close|pg_cancel_query)"
tags:
1 change: 1 addition & 0 deletions rules/sinks/third_parties/sdk/amazonaws/java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ sinks:
- "aws.amazon.com/kinesis/data-firehose"
patterns:
- "(?i)(com[.]amazonaws[.]services[.]kinesisfirehose).*"
- "org.apache.flink.connector.firehose.sink.KinesisFirehoseSink.builder.*"
tags:

- id: ThirdParties.SDK.Amazonaws.Pinpoint
Expand Down
20 changes: 19 additions & 1 deletion rules/sinks/third_parties/sdk/google/java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,24 @@ sinks:
domains:
- "admob.google.com"
patterns:
- "(?i)(com[.]google[.]ads[.]mediation|com[.]google[.]android[.]gms[.]ads|com[.]google[.]api[.]services[.]admob|com[.]google[.]ads).*"
- "(?i)(com[.]google[.]ads[.]mediation|com[.]google[.]android[.](gms[.]ads|ump)|com[.]google[.]api[.]services[.]admob).*"
tags:

- id: ThirdParties.SDK.Google.Ads
name: Google Ads
domains:
- "ads.google.com"
patterns:
- "(?i)(com[.]google[.]android[.]gms[.]ads|com[.]google[.]ads[.](googleads|interactivemedia)).*"
- "(?i).*(ClickConversion[.]Builder[.]).*"
tags:

- id: ThirdParties.SDK.Google.Adsense
name: Google Adsense
domains:
- "adsense.google.com"
patterns:
- "(?i)(com[.]google[.]api[.]services[.]adsense).*"
tags:

- id: ThirdParties.SDK.Google.Analytics
Expand Down Expand Up @@ -98,6 +115,7 @@ sinks:
- "cloud.google.com/pubsub"
patterns:
- "(?i)(com[.]google[.]cloud[.]pubsub|com[.]google[.]pubsub).*"
- "org.apache.flink.streaming.connectors.gcp.pubsub.PubSubSink.newBuilder.*"
tags:

- id: ThirdParties.SDK.Google.Bigquery
Expand Down

0 comments on commit afb4ce2

Please sign in to comment.