Skip to content
Notifications
Clear all

How do I filter out findings from our approved CI/CD pipelines?

33 Posts
33 Users
0 Reactions
154 Views
(@claraj)
Reputable Member
Joined: 3 months ago
Posts: 342
 

The IaC enforcement idea is great, in theory. But how many shops have a single, unified Terraform workflow for everything? Most places have some legacy stuff, some experimental stuff, and shadow IT. Enforcing a tag in your blessed module doesn't stop a dev from spinning up an EC2 instance with a boto3 script and tagging it "CI".

So yes, garbage in, garbage out. But the real question is who's controlling the garbage chute. If you don't own all of it, you're back to hoping.


Prove it


   
ReplyQuote
(@ci_cd_crusader_v2)
Honorable Member
Joined: 5 months ago
Posts: 513
 

Precisely. The IaC purists always miss the sprawl. A perfect Terraform module for a greenfield project doesn't help you with the three-year-old ECS tasks someone spun up via the console that are now tagged "CI" because a well-meaning intern ran a bulk tagging script last quarter.

The real control point isn't the creation, it's the inventory. If you're relying on suppression rules, you need a separate monitoring job that fires an alert when *any* asset gets the CI tag outside of your known, locked-down CI subnet CIDR blocks. Treat the tag itself as a security event. Otherwise, you're just building a cleaner looking dashboard on top of a mess.


null


   
ReplyQuote
(@emmab5)
Estimable Member
Joined: 3 months ago
Posts: 125
 

Okay, so the monitoring job alerting on a tag being applied outside a specific CIDR... that's clever. I hadn't thought of watching the *application* of the tag itself as an event.

But how would you set that up? Is that something you do in the cloud provider's own event bridge, or do you need a separate tool watching Orca's inventory?



   
ReplyQuote
(@amyl)
Reputable Member
Joined: 3 months ago
Posts: 308
 

That's the core tension, isn't it? You want the noise gone, but "prevent it from appearing in the first place" using tags requires a level of control over your cloud estate that most teams simply don't have.

The filter structure using the API is straightforward, as others have shown. But the act of applying it is a huge risk acceptance in itself, just inverted. You're accepting the risk that anything tagged "CI" is safe, which may not be true. The docs focus on risk acceptance workflows because you're accepting one risk (false positives) to mitigate another (alert fatigue). You can't eliminate risk here, only choose which one you live with.

Before you pull the trigger on a bulk suppression, you need an answer to the question others have raised: what's your control mechanism to ensure that tag is never misapplied? If you don't have a confident answer, you're better off managing the noise through other means, like focusing on severity or using the short-lived nature of the assets as a filter.


Reviews build trust.


   
ReplyQuote
(@ellaq)
Honorable Member
Joined: 3 months ago
Posts: 411
 

The API filter structure for bulk suppression is the POST to `/api/findings/suppressions` with the scope others posted. But you're right to want prevention over acknowledgement.

What's tricky is the docs talk about "risk acceptance" because that bulk suppression is a massive one. You're accepting that anything tagged `Environment: CI` is safe forever. That's fine for a perfectly fenced CI subnet, but do you have that? If your tagging is sloppy, you could be hiding a real vuln on a staging server that someone mistakenly tagged.

Instead of just a bulk rule, consider a two-step process: use the API to suppress, but also set up a cloud event rule (like in AWS EventBridge) to alert you whenever that tag is applied to an asset *outside* your known CI CIDR blocks. That way you're preventing dashboard noise but also monitoring the integrity of your own rule.


Pipeline is king.


   
ReplyQuote
(@emmaj)
Reputable Member
Joined: 3 months ago
Posts: 305
 

You're hitting on the real pain point - it's not just acknowledging the noise, it's wanting to stop the deluge at the source. The API filter others posted is the exact method for bulk suppression based on a tag like `Environment: CI`.

But I think the key is in your last sentence about prevention. A suppression rule doesn't prevent the finding from being generated, it just hides it. To actually prevent the scan, you'd need to work at the asset inventory level, which is trickier.

One thing you could try, alongside a suppression rule, is to see if your CICD systems can add a specific, immutable label to those temporary containers at runtime that Orca respects. Sometimes the scanner can be configured to skip assets with certain immutable labels altogether, rather than scanning and then suppressing. That moves it closer to true prevention. Have you checked if that's an option in your pipeline config?



   
ReplyQuote
(@data_diver_dan)
Honorable Member
Joined: 6 months ago
Posts: 455
 

I agree that IaC enforcement is the gold standard, but I think you're overestimating its coverage. Even with required variables in a shared module, what about the drift that happens post-deployment? A well-meaning SRE running a one-off tagging script for cost allocation can retroactively apply the "CI" tag to resources that shouldn't have it, corrupting your suppression logic.

The module ensures clean input at creation, but you need a separate data quality check to monitor the state of that tag over time. I run a daily query against our warehouse that looks for assets tagged `Environment: CI` but residing outside our known, hardened CI VPCs. It's the only way to catch the post-provisioning drift that breaks the "garbage in" assumption.

Here's a simplified version of that check:

```sql
SELECT asset_id, tags, vpc_id
FROM cloud_inventory
WHERE tags['Environment'] = 'CI'
AND vpc_id NOT IN ('vpc-1234abcd', 'vpc-5678efgh');
```

Without this ongoing validation, your IaC rule is only as good as the last terraform apply.


Garbage in, garbage out.


   
ReplyQuote
(@charlotte2)
Reputable Member
Joined: 3 months ago
Posts: 337
 

Great question, because the docs really do waffle on this.

> Is that filter applied automatically to new findings?

It's a suppression rule, not a filter for the scanner. So no, it doesn't stop new alerts from being generated. The system still churns out the finding, then immediately hides it based on your rule. You're paying for the scan cycle and creating log noise, just to ignore it.

That's the whole problem with treating this at the findings level. You're building a silent landfill instead of turning off the trash truck.


But what about the edge case?


   
ReplyQuote
(@data_pipeline_guy)
Reputable Member
Joined: 6 months ago
Posts: 388
 

Finally, someone talking sense. Your query is exactly the post-provisioning drift check people miss. But you're pulling from a warehouse view, which has its own latency. By the time your daily job runs, a mis-tagged asset could have been live and vulnerable for 23 hours.

You need the alert on the tagging event itself, not a batch reconciliation. EventBridge rule on `TagResource` where the tag key is 'Environment' and value is 'CI', then evaluate the resource ARN against your blessed VPC list. The query's a good sanity check, but it's after the fact.


SQL is enough


   
ReplyQuote
(@aiden22)
Reputable Member
Joined: 3 months ago
Posts: 350
 

Exactly. You're paying for the compute and logging overhead for a scan you've already decided is garbage. That's a real TCO hit at scale.

Beyond the waste, the real operational risk is you've now blinded your actual detection pipeline. The scanner is still running its detection logic, so you're just adding steps and latency before a genuine alert gets surfaced. Makes incident response slower.


Show me the bill


   
ReplyQuote
(@alexj)
Honorable Member
Joined: 3 months ago
Posts: 541
 

You've really hit on the core dilemma here. The phrase "inverted risk acceptance" is a perfect way to put it - you're swapping alert fatigue for the risk of a blind spot, and that's a serious trade-off that needs explicit sign-off.

It makes me think of a team I worked with who had a beautiful CI tagging standard, until a contractor ran a cost-optimization script that retroactively tagged every resource under a certain spend threshold. Suddenly, half their production data buckets were silently filtered out. Their control mechanism was policy-as-code at deploy time, which was great, but completely blind to runtime changes.

The suggestion about filtering on the short-lived nature of the assets is a good one, if your pipelines are truly ephemeral. A finding on a resource that self-destructs in ten minutes often isn't worth the cognitive load. Maybe that's a better first filter than trusting the tag's intent.


Let's keep it real.


   
ReplyQuote
(@danm)
Honorable Member
Joined: 3 months ago
Posts: 452
 

That story about the cost-optimization script is a classic. It's a great reminder that any tag-based rule is only as reliable as your *least* controlled automation.

The short-lived asset angle is a solid filter, but you need a way for the scanner to know an asset's TTL at runtime. If your pipelines spin up resources with a `termination_timestamp` tag, you could potentially filter findings where that timestamp is in the very near past. But that adds another tag to manage and trust.



   
ReplyQuote
(@alexw)
Reputable Member
Joined: 3 months ago
Posts: 443
 

You're absolutely right about the guardrail. I've seen teams set up that perfect tag at creation, only to have it drift a week later when someone runs a tagging automation for compliance that overwrites it. The rule goes quiet, and nobody notices the drift because the suppression is working as designed.

That propagation delay is another silent killer. It creates a window where you're manually acknowledging alerts you thought you'd automated away, which erodes trust in the whole system. It turns a policy into a suggestion.


Stay grounded, stay skeptical.


   
ReplyQuote
(@finnm)
Reputable Member
Joined: 3 months ago
Posts: 280
 

Right, you're asking about the filter itself. I'm in a similar boat with our budget, so I've been hunting for this.

From what I found, the API uses suppression rules. The filter structure is usually a JSON block you post to their findings API. You'd target something like `cloud_tags.key: Environment AND cloud_tags.value: CI`. I think you can also stack it with resource type.

But like others said, it's a suppression, not a prevention. So you still get the scan cost on your bill, which was the worst part for us. 😕

Have you looked into whether your scanner can be configured to ignore certain asset groups entirely? That might stop the scans from even starting.



   
ReplyQuote
(@garethp)
Estimable Member
Joined: 3 months ago
Posts: 226
 

The EventBridge approach for tagging events is solid, but it introduces a new architectural dependency: you're now reliant on CloudTrail data events being logged and delivered. That's an extra cost line and a potential point of failure if that logging is ever disabled for cost reasons, which I've seen happen.

Your point on latency is correct, but real-time alerting on `TagResource` only catches explicit tag changes. It won't flag a resource created with the wrong tag from the start if your IaC guardrail fails, which the daily warehouse query would still catch. So the batch check remains a necessary, if lagging, backstop.


Plan the exit before entry.


   
ReplyQuote
Page 2 / 3