Using RedAssay / Automation
Integrations
Connect AWS, Google Cloud and GitHub with read-only access, so that a passing configuration check is recorded as evidence.
On this page
What integrations do
An integration lets RedAssay read configuration from a system you run. A check asks one question with a clear answer, such as whether every console user has multi-factor authentication, and records the result with the time it was taken.
Three providers can be connected: Amazon Web Services, Google Cloud and GitHub. Microsoft Azure is not supported. Checks cover only the accounts you connect; everything else, such as a management review or a restore test, is still collected by people as described in Tasks and evidence. A provider shown as not available cannot be connected for the time being; contact RedAssay if you need it.
Amazon Web Services
AWS is connected with a cross-account IAM role that RedAssay assumes for 15 minutes at a time. No access keys for your account are stored.
- RedAssay generates a random external ID for the connection and shows you a CloudFormation template, the role's trust policy and its permission policy.
- In your AWS account, create the role from that template or by hand. The template names it
RedAssayReadOnly. If you create it by hand, its name must start withRedAssayReadOnlyand it must have no path. - Paste the role's ARN into RedAssay, choose the regions to check (1 to 20;
us-east-1unless you say otherwise), and verify the connection. Verification assumes the role and confirms it belongs to the account named in the ARN.
Two kinds of role ARN are refused. One is a role whose name does not start with RedAssayReadOnly: RedAssay's own AWS identity is meant to be able to assume roles of that name only, so no other role can be reached through RedAssay. The other is a role in an AWS account that belongs to RedAssay itself: the role must be in your own account. That second check is repeated each time the role is about to be assumed.
The external ID is generated by RedAssay, never chosen by you, and is required by the role's trust policy. It prevents another customer from pointing their organization at your role (the confused-deputy problem). Deleting the role ends access immediately.
The permission policy is a custom one, limited to these 21 read actions. None reads the contents of your data: the policy has no s3:GetObject, no object listing and no kms:Decrypt.
| Service | Actions |
|---|---|
| IAM | GetAccountSummary, GetAccountPasswordPolicy, ListUsers, GetLoginProfile, ListMFADevices, ListAccessKeys |
| CloudTrail | DescribeTrails, GetTrailStatus |
| S3 | ListAllMyBuckets, GetAccountPublicAccessBlock, GetBucketPublicAccessBlock, GetEncryptionConfiguration, GetBucketPolicyStatus |
| RDS | DescribeDBInstances |
| EC2 | GetEbsEncryptionByDefault, DescribeSecurityGroups |
| KMS | ListKeys, DescribeKey, GetKeyRotationStatus |
| GuardDuty | ListDetectors, GetDetector |
Google Cloud
Google Cloud is connected one project at a time, with the JSON key of a service account you create and bind to a custom role holding exactly these permissions:
resourcemanager.projects.get,resourcemanager.projects.getIamPolicyiam.serviceAccounts.list,iam.serviceAccountKeys.liststorage.buckets.listcloudsql.instances.listcompute.firewalls.list,compute.networks.list
Only four fields of the key file are used: the client email, the private key, its key id and the project id. Addresses inside the file are ignored, and tokens are always requested from Google's fixed endpoint. Deleting the key or the service account ends access. Keyless access through Workload Identity Federation is not supported yet.
GitHub
GitHub is connected with a fine-grained personal access token (it starts with github_pat_) created by an organization owner, with the organization as its resource owner, covering all repositories, with read-only access to three permissions: organization Administration, repository Metadata and repository Administration. Classic tokens (ghp_ and the like) are refused, because they cannot be limited to read-only access to an organization.
Before the token is stored, RedAssay reads the organization's two-factor setting with it. Only a token that an organization owner issued for that organization can see that setting, so a token that cannot read it is not accepted. If the token later loses that access, the two-factor check is recorded as denied. Revoking the token in GitHub ends access.
Repository checks look at active repositories. Archived repositories and forks are left out.
Checks that run
AWS
- The root account has MFA
- IAM users with console access have MFA
- The account password policy is strong (finding only)
- Active access keys are younger than 90 days (finding only)
- CloudTrail is multi-region with log file validation
- S3 public access is blocked at account level (finding only)
- S3 buckets block public access (finding only)
- S3 buckets are encrypted by default
- RDS instances are encrypted at rest
- RDS automated backups are kept 7 days or more
- RDS instances are not publicly accessible
- EBS encryption is on by default
- No security group opens port 22 or 3389 to the internet
- Customer-managed KMS keys rotate
- GuardDuty is enabled
Google Cloud
- No user account holds the project's Owner role directly
- Service-account keys are younger than 90 days (finding only)
- Admin read, data read and data write audit logs are on for all services
- Buckets enforce public access prevention (finding only)
- Buckets use uniform bucket-level access (finding only)
- Cloud SQL is not open to 0.0.0.0/0
- Cloud SQL automated backups are on
- Cloud SQL requires SSL
- No firewall rule opens port 22 or 3389 to the internet
- The default VPC network has been removed
GitHub
- The organization requires two-factor authentication
- Default branches require a pull request with at least one approving review, through a branch protection rule or an active ruleset
- Secret scanning is enabled
- Dependabot alerts are enabled (finding only)
A check marked finding only is shown to you but is not used as evidence for any control, because no library control asks the question it answers: a bucket's public exposure is not how access is approved, a key's age is not an access review, and alerts being switched on does not show that vulnerabilities are fixed in time. That leaves 11 AWS checks, 7 Google Cloud checks and 3 GitHub checks that can produce evidence. Checks over a list of resources pass only when at least one resource was evaluated and none fell short.
The branch check is about change control, not protection as such: a default branch that is protected but does not require a reviewed pull request fails it. The Google Cloud Owner check reads the project's own role bindings only, not roles inherited from a folder or the organization.
From check to evidence
- Each check that counts as evidence feeds a monthly task, created the first time the check runs and linked to the controls the check is about. If your organization has none of those controls, the check still runs and its results are kept, but it produces no task and no evidence.
- A passing check adds evidence to that task: a written record of what was checked, hashed like all evidence, with the time the check finished as its collected date.
- A failing check adds no evidence. The task and the controls it is linked to are Failing until the finding is fixed and the check passes again.
- A check that could not run, timed out or was denied access keeps its task out of Passing. A check with nothing to look at, such as an RDS check in an account with no databases, counts as not applicable.
- Every result is kept as history, whether or not it produced evidence: results are only ever added, never changed or removed. Each records the check and its version, the outcome, a summary, each resource evaluated (up to 200), the start and end times and a SHA-256 of the provider data the check looked at.
- On a task fed by a check only successful runs count. Evidence added to it by hand is stored but ignored by the status.
- Once a check has written a result for its task, that task cannot be deleted, and its frequency and its linked controls cannot be changed.
An automated check is one source of evidence for a control, alongside the control's other tasks and policies. It does not by itself make a control Passing. How a control's state is derived from all of its sources is described in Frameworks and readiness.
When checks run
Checks run when someone presses Run now on a connection. The product has no schedule setting, so plan to run each connection yourself, at least once a month: a check that passed once and is never run again goes overdue like any other monthly evidence.
A run executes 4 checks at a time, gives each check 45 seconds and the whole run 200 seconds, and only one run per connection happens at a time. A check that overruns is recorded as timed out.
How connection details are handled
- The Google Cloud key and the GitHub token are encrypted with AES-256-GCM before they are stored, under a key held only by RedAssay and kept outside the database, and bound to your organization and that connection, so a stored value copied onto another connection does not decrypt. For AWS RedAssay stores no secret: only the role ARN and external ID.
- A stored secret is never returned by the API and never written to the audit log. The app shows only the last four characters of an identifier.
- Disconnecting an integration destroys the stored credential and keeps the result history.
- Owners and admins can connect, run and remove integrations. Auditors can read connections and results. Connecting, verifying, running and disconnecting are written to the audit log.