Turn on CloudTrail log file validation for the management-events trail
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 75/100
- Tipo de issue
- Funcionalidade
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- aws, terraform
- Domínio
- infrastructure, security
Direção de pesquisa
O trabalho está em terraform/cloudtrail.tf. Encontre o recurso aws_cloudtrail.management_events e altere enable_log_file_validation para true. Atualize o comentário de duas linhas acima dele e a lista de comentários do cabeçalho do arquivo. Execute terraform plan para confirmar que apenas esse recurso é alterado in-place. Após o merge, verifique com os comandos fornecidos aws cloudtrail describe-trails e aws s3 ls.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Overview
We need to turn on CloudTrail log file validation for the management-events trail, so that both of the account's trails produce tamper-evident digest files. Today one trail has it on and the other has it off, which means the trail carrying the account's management events — the higher-value audit record of the two — is the one that cannot be proven unaltered.
Action Items
- In
terraform/cloudtrail.tf, changeenable_log_file_validationfromfalsetotrueon theaws_cloudtrail.management_eventsresource. It is on line 251 as of 2026-09-23 — line numbers drift, so find it by the resource nameresource "aws_cloudtrail" "management_events"rather than by number. - Update the two-line comment immediately above that resource, which currently reads that the inconsistency is "reproduced rather than resolved -- turning it on is a live change and its own ticket." That ticket is this one, so the comment should now say the two trails agree and that validation is on for both. Leave the rest of the file's commentary alone.
- Update the file-header comment near the top of
terraform/cloudtrail.tfthat lists four things deliberately not added by #191. Log file validation is one of the four; remove it from that list and leave the other three (KMS encryption, a CloudWatch Logs destination, a bucket lifecycle configuration) exactly as they are — each is still outstanding. - Confirm the plan shows exactly one resource changing, in place:
aws_cloudtrail.management_events[0]withenable_log_file_validation: false -> true. There must be no replacement and nothing else in the diff. A replacement would destroy and recreate a trail carryingprevent_destroy, so it would fail at plan time — but check rather than rely on that. - Note this resource is gated on
var.iam_only, so it is skipped entirely in a contributor's own AWS account and only applies in CI, whereiam_only = false. A local plan with the default variable will show no change at all; that is expected and is not evidence the edit is wrong. - After the PR merges and the apply runs, confirm both trails report validation on:
aws cloudtrail describe-trails --query 'trailList[].{Name:Name,Validation:LogFileValidationEnabled}' --output table. Both rows must readTrue. - After the PR merges, confirm digest files actually start being written, which is the real proof the setting took effect:
aws s3 ls s3://aws-cloudtrail-logs-035866691871-6539ef03/AWSLogs/035866691871/CloudTrail-Digest/ --recursive | tail. Expect nothing for up to an hour — CloudTrail writes the first digest on its own schedule, not at apply time — so this step is deliberately separate from the one above and may need coming back to later in the day.
Resources/Instructions
terraform/cloudtrail.tf— the only file this ticket touches. Themanagement_eventstrail is the second of the two declared in it; the first,tf_backend_logs, already hasenable_log_file_validation = trueand is the model.- devops-security#191 — imported both trails and both buckets as-is, and deliberately left this inconsistency in place. Its
cloudtrail.tfcomments name this as follow-on work. - Validating CloudTrail log file integrity — what the digest files are and how to verify one with
aws cloudtrail validate-logs. - Digest files are delivered to the same bucket as the logs, under
AWSLogs/<account>/CloudTrail-Digest/, and are billed as ordinary S3 objects. They are small and low-volume relative to the log files themselves, so this adds no meaningful storage cost.
Line numbers above were accurate on 2026-09-23 and may drift; locate the targets by resource name and by the quoted comment text instead.
- Linguagem predominante
- TypeScript
- Estrelas
- 1
- Forks
- 14
- Merge médio
- 4h 56min
- PRs com merge (30d)
- 10
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de hackforla/devops-security
-
complexity: small feature: security role: DevOps Engineer size: 2pt
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
hackforla/devops-security#203 ·
Mantenedores costumam responder em até 1 dia
-
complexity: medium feature: maintenance role: DevOps Engineer size: 2pt
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
hackforla/devops-security#170 ·
Mantenedores costumam responder em até 1 dia
-
complexity: medium feature: maintenance role: DevOps Engineer size: 3pt
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 52/100
hackforla/devops-security#208 ·
Mantenedores costumam responder em até 1 dia
-
complexity: prework Feature: Onboarding/Contributing.md role: DevOps Engineer size: 1pt
Dificuldade 3/5 3-5 dias Facilidade para iniciantes 40/100
hackforla/devops-security#200 ·
Mantenedores costumam responder em até 1 dia
-
Create new AWS User AccountTalvez livre de novo @Sbairamian assumiu há 30 dias e não há nenhum pull request aberto. Abertacomplexity: small feature: AWS user request role: DevOps Engineer size: 1pt
hackforla/devops-security#198 · 1 responsável ·
Mantenedores costumam responder em até 1 dia
Todas as issues de hackforla/devops-security
Issues semelhantes
-
area:security documentation effort:S priority:P2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
Mantenedores costumam responder em até 1 dia
-
app:web meta:ops
Dificuldade 2/5 Meio dia Facilidade para iniciantes 78/100
osu-tournament-rating/otr#1113 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
typegoose/mongodb-memory-server#1040 ·
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 92/100