In Ruby, can request.host be trusted to differentiate between a staging environment and production?

Let’s say I have two environments: https://qa.example.com and https://example.com. In QA, I want to allow access to something insecure, like a special route that allows logging in without a password.
What are the security concerns of check… Continue reading In Ruby, can request.host be trusted to differentiate between a staging environment and production?

Is checking to see if any parameters contain "__proto___" an effective way to mitigate Prototype Pollution vulnerability?

let key = keys[j] === ” ? (currentParams as any).length : keys[j];
if (key === ‘__proto__’) {
throw new Error(‘Prototype pollution detected.’);
}

It at least defeats basic url-encoding, but I am unsure if it is robust e… Continue reading Is checking to see if any parameters contain "__proto___" an effective way to mitigate Prototype Pollution vulnerability?

Why is storing a password hashed more secure than storing it encrypted? [duplicate]

Assuming the hashing includes properly implemented salting and uses a proper password stretching algorithm such as scrypt, and that the encryption algorithm is a secure symmetric algorithm with a random key.
If an attacker gets access to p… Continue reading Why is storing a password hashed more secure than storing it encrypted? [duplicate]

What prevents an attacker from registering a TLS certificate for an existing site?

This would be used in a phishing attack for example – coffee shop attack where google.com becomes a website controlled by the attacker completed with the magic lock next to the URL. Can I use letsencrypt to create a valid cert for any webs… Continue reading What prevents an attacker from registering a TLS certificate for an existing site?

Is the purpose of Google Cloud VPC Service Controls to enforce the BLP star property (no write down)?

While Google and AWS support managed firewalls and network connectivity rules to prevent an attacker from entering the network, Google also offers VPC Service Controls. Is this to prevent data exfiltration and an implementation of the BLP … Continue reading Is the purpose of Google Cloud VPC Service Controls to enforce the BLP star property (no write down)?

What tools exist to integrate a open source secrets detector into a deployment pipeline and Github? [migrated]

There are a number of open source secrets detectors that run via CLI. (Gitrob, trufflehog) However, is there a good way to integrate these that they run on a per PR basis? The use case here would be alerting a developer that they’ve commit… Continue reading What tools exist to integrate a open source secrets detector into a deployment pipeline and Github? [migrated]

Is it advisable to tie different capabilities to different session tokens?

Let’s say you’re creating a banking web application with mobile apps. A bank user has permissions “transfer money” and “view balances.” When a user logs in, we can create a session token (typical random string, stored in the … Continue reading Is it advisable to tie different capabilities to different session tokens?