Skip to content

feat:[NEXT-625] Added Tagging Policy for AWS AMI#2375

Open
arunpaladin wants to merge 1 commit into
masterfrom
feat/ami-tagging-policy
Open

feat:[NEXT-625] Added Tagging Policy for AWS AMI#2375
arunpaladin wants to merge 1 commit into
masterfrom
feat/ami-tagging-policy

Conversation

@arunpaladin
Copy link
Copy Markdown
Collaborator

@arunpaladin arunpaladin commented Aug 28, 2025

feat:NEXT-625 Added Tagging Policy for AWS AMI

Summary by CodeRabbit

  • New Features

    • Added a new AWS AMI tagging policy enforcing mandatory tags (Application, Environment, Stack, Role) with scheduled evaluations and defined severity/category.
  • Chores

    • Updated the “Delete Unused VM Disk” policy description and resolution link for clearer guidance.
    • Corrected the EBS Snapshot policy reference to the appropriate deny-public-access rule.
    • Added detailed parameters for the new tagging policy (e.g., mandatory tags, delimiter).
    • Set encryption to false for parameters across several existing policies to streamline configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Aug 28, 2025

Walkthrough

Introduces a new AWS AMI tagging policy with associated cf_PolicyTable and cf_PolicyParams entries, updates descriptions and resolution URLs for an existing GCP VM disk cleanup policy, adjusts an EBS snapshot policy UUID, and standardizes multiple policy parameter rows by setting encrypt=false, all within DB_Policy.sql.

Changes

Cohort / File(s) Summary
New AWS AMI tagging policy
installer/resources/pacbot_app/files/DB_Policy.sql
Added cf_PolicyTable insertion for taggingRule_version-1_aws_ami with full metadata (name, display name, description, category=tagging, schedule 0 0/12 * * ? *, ARN, etc.).
Tagging policy parameters
installer/resources/pacbot_app/files/DB_Policy.sql
Inserted cf_PolicyParams for the new policy: mandatoryTags=Application,Environment,Stack,Role, policyKey=check-for-missing-mandatory-tags, splitterChar=,, plus related fields.
GCP unused VM disk policy edits
installer/resources/pacbot_app/files/DB_Policy.sql
Updated delete_unused_vm_disk policy: new resolutionUrl (Paladin Cloud/GCP reference) and revised policyDesc (cost/security/performance implications). Removed a duplicate/older insertion variant.
EBS snapshot policy UUID update
installer/resources/pacbot_app/files/DB_Policy.sql
Set policyUUID=deny_public_access_to_ebs_snapshot for EbsSnapShot_version-1_EbsSnapShot_snapshot.
Encrypt flag standardization
installer/resources/pacbot_app/files/DB_Policy.sql
Updated multiple existing cf_PolicyParams rows to encrypt=false (e.g., Ec2StoppedInstanceForLong_version-1_..., Ec2WithPubAccPort1434_version-1_..., etc.).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Scheduler
  participant PolicyEngine as Policy Engine
  participant Cloud as AWS APIs
  participant DB as Policy Tables

  rect rgba(230,245,255,0.6)
  note right of DB: New policy: taggingRule_version-1_aws_ami
  Scheduler->>PolicyEngine: Trigger (cron 0 0/12 * * ? *)
  PolicyEngine->>DB: Load policy config + params
  DB-->>PolicyEngine: Metadata (mandatoryTags, policyKey, splitterChar)
  PolicyEngine->>Cloud: List AMIs (targetType: aws_ami)
  Cloud-->>PolicyEngine: AMI inventory with tags
  alt Missing mandatory tags
    PolicyEngine->>PolicyEngine: Flag non-compliant AMIs
    PolicyEngine-->>Scheduler: Findings (severity/category)
  else All tags present
    PolicyEngine-->>Scheduler: No findings
  end
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • kevin-paladin
  • rnithinpaladin
  • ershad-paladin
  • plyubich

Poem

I thump my paws on fields of SQL rows,
New tags for AMIs—a garden grows.
Disks tidied, snapshots rightly named,
Encrypt flags aligned, parameters tamed.
With whiskered grace I hippity-hop—
Policies planted, pop pop pop! 🐇✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • JIRA integration encountered authorization issues. Please disconnect and reconnect the integration in the CodeRabbit UI.
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/ami-tagging-policy

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbit in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbit in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbit gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbit read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbit help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbit ignore or @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbit summary or @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbit or @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between cb4f2bb and 79991be.

📒 Files selected for processing (1)
  • installer/resources/pacbot_app/files/DB_Policy.sql (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Analyze (java)
  • GitHub Check: SonarCloud-Build
🔇 Additional comments (4)
installer/resources/pacbot_app/files/DB_Policy.sql (4)

612-612: Confirm the updated GCP resolution URL anchor is stable/correct

The anchor looks opaque (#articleTOC_104). Consider switching to a semantic anchor (e.g., #delete-unused-vm-disk) if available, to avoid future link rot.

Would you like me to scan the repo/wiki references and propose the exact canonical anchor?


2434-2436: Params for new AMI tagging policy look correct; keep them in sync with JSON payload

Definitions for mandatoryTags, policyKey, and splitterChar match the policyParams JSON.

After fixing the alexaKeyword/threadsafety in the JSON (Line 610), confirm if any corresponding cf_PolicyParams rows are needed for UI controls (e.g., severity). If yes, add them to avoid drift.


614-614: No action needed: policyUUID update aligns with intended EBS snapshot policy
The update at line 614 replaces the incorrect default UUID with deny_public_access_to_ebs_snapshot, matching the policy’s name, description, and resolution URL.


2439-2441: No encrypted parameters found for these policyIDs—bulk clear is safe. Ran a scan of all INSERT IGNORE INTO \cf_PolicyParams`statements for the listed policyIDs and found noencrypt='true'orencrypt=1` entries.

INSERT IGNORE INTO cf_PolicyTable (policyId, policyUUID, policyName, policyDisplayName, policyDesc, resolution, resolutionUrl, targetType, assetGroup, alexaKeyword, policyParams, policyFrequency, policyExecutable, policyRestUrl, policyType, policyArn, severity, category, autoFixAvailable, autoFixEnabled, allowList, waitingTime, maxEmailNotification, templateName, templateColumns, fixType, warningMailSubject, fixMailSubject, warningMessage, fixMessage, violationMessage, elapsedTime, userId, createdDate, modifiedDate, status) VALUES ('remove_unused_scale_set','remove_unused_scale_set',' Delete Unused Scale Set',' Delete Unused Scale Set','Identify any empty virtual machine scale sets available within your Microsoft Azure cloud account and delete them in order to eliminate unnecessary costs and meet compliance requirements when it comes to unused resources.','Every empty virtual machine scale set should be removed for cost optimization and better management of your cloud resources.','','virtualmachinescaleset','azure','remove_unused_scale_set','{"params":[{"encrypt":false,"value":"check-for-unused-Virtual-machine-scale-set","key":"policyKey"},{"encrypt":false,"value":",","key":"splitterChar"},{"encrypt":false,"value":"Application,Environment,Stack,Role","key":"mandatoryTags","isMandatory":true,"description":"Assets should have these mandatory tags","defaultVal":"Application,Environment,Stack,Role","displayName":"Mandatory tags"},{"encrypt":false,"value":"low","key":"severity"},{"encrypt":false,"value":"security","key":"policyCategory"},{"encrypt":false,"value":"","key":"policyOwner"}],"environmentVariables":[],"policyId":"remove_unused_scale_set","autofix":false,"alexaKeyword":"remove_unused_scale_set","policyRestUrl":"","targetType":"virtualmachinescaleset","pac_ds":"azure","assetGroup":"azure","policyUUID":"remove_unused_scale_set","policyType":"ManagePolicy"}','0 0/6 * * ? *','','','ManagePolicy','arn:aws:events:us-east-1:***REMOVED***:rule/remove_unused_scale_set','high','cost','false','false',NULL,24,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,24,'ASGC','2023-07-19','2023-07-19','ENABLED');

INSERT IGNORE INTO cf_PolicyTable (policyId, policyUUID, policyName, policyDisplayName, policyDesc, resolution, resolutionUrl, targetType, assetGroup, alexaKeyword, policyParams, policyFrequency, policyExecutable, policyRestUrl, policyType, policyArn, severity, category, autoFixAvailable, autoFixEnabled, allowList, waitingTime, maxEmailNotification, templateName, templateColumns, fixType, warningMailSubject, fixMailSubject, warningMessage, fixMessage, violationMessage, elapsedTime, userId, createdDate, modifiedDate, status) VALUES ('delete_unused_vm_disk','delete_unused_vm_disk',' Delete Unused VM Disk','Delete Unused VM Disk','Identify any unattached (unused) Gcp virtual machine disk volumes available within yourcloud account and delete them in order to lower the cost of your monthly bill and reduce the risk of sensitive data leakage.','Every unused virtual machine disk should be removed for cost optimization and better management of your cloud resources.','','gcpdisks','gcp','delete_unused_vm_disk','{"params":[{"encrypt":false,"value":"delete-unused-vm-disk","key":"policyKey"},{"encrypt":false,"value":",","key":"splitterChar"},{"encrypt":false,"value":"Application,Environment,Stack,Role","key":"mandatoryTags","isMandatory":true,"description":"Assets should have these mandatory tags","defaultVal":"Application,Environment,Stack,Role","displayName":"Mandatory tags"},{"encrypt":false,"value":"high","key":"severity"},{"encrypt":false,"value":"cost","key":"policyCategory"},{"encrypt":false,"value":"","key":"policyOwner"}],"environmentVariables":[],"policyId":"delete_unused_vm_disk","autofix":false,"alexaKeyword":"delete_unused_vm_disk","policyRestUrl":"","targetType":"gcpdisks","pac_ds":"gcp","assetGroup":"gcp","policyUUID":"delete_unused_vm_disk","policyType":"ManagePolicy"}','0 0/6 * * ? *','','','ManagePolicy','arn:aws:events:us-east-1:***REMOVED***:rule/delete_unused_vm_disk','high','cost','false','false',NULL,24,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,24,'ASGC','2023-07-19','2023-07-19','ENABLED');
INSERT IGNORE INTO cf_PolicyTable (policyId, policyUUID, policyName, policyDisplayName, policyDesc, resolution, resolutionUrl, targetType, assetGroup, alexaKeyword, policyParams, policyFrequency, policyExecutable, policyRestUrl, policyType, policyArn, severity, category, autoFixAvailable, autoFixEnabled, allowList, waitingTime, maxEmailNotification, templateName, templateColumns, fixType, warningMailSubject, fixMailSubject, warningMessage, fixMessage, violationMessage, elapsedTime, userId, createdDate, modifiedDate, status) VALUES ('taggingRule_version-1_aws_ami','taggingRule_version-1_aws_ami','taggingRule_version-1_aws_ami','Assign Mandatory Tags to AWS AMI','Assigning mandatory tags to AMI is important for identifying resources, allocating costs, automation, security, and compliance purposes. Mandatory tags ensure consistency, manageability, cost-effectiveness, security, and compliance across your aws infrastructure.','Add the mandatory tags to the assets,Follow the Cloud Asset Tagging guidelines.','https://github.com/PaladinCloud/CE/wiki/AWS-Policy#Assign-Mandatory-Tags-to-AWS-AMI','ami','aws','awsamitaggingrule','{\"params\":[{\"encrypt\":false,\"value\":\",\",\"key\":\"splitterChar\"},{\"encrypt\":false,\"value\":\"check-for-missing-mandatory-tags\",\"key\":\"policyKey\"},{\"encrypt\":false,\"value\":\"high\",\"key\":\"severity\"},{\"encrypt\":false,\"value\":\"Application,Environment,Stack,Role\",\"key\":\"mandatoryTags\",\"isMandatory\":true,\"description\":\"Assets should have these mandatory tags\",\"defaultVal\":\"Application,Environment,Stack,Role\",\"displayName\":\"Mandatory tags\"},{\"isValueNew\":true,\"encrypt\":false,\"value\":\"tagging\",\"key\":\"policyCategory\"}],\"environmentVariables\":[],\"policyId\":\"taggingRule_version-1_aws_ami\",\"autofix\":false,\"alexaKeyword\":\"amitagginrule\",\"policyRestUrl\":\"\",\"targetType\":\"ami\",\"pac_ds\":\"aws\",\"assetGroup\":\"aws\",\"policyUUID\":\"taggingRule_version-1_aws_ami\",\"policyType\":\"ManagePolicy\"}','0 0/12 * * ? *','','','ManagePolicy','arn:aws:events:us-east-1:***REMOVED***:rule/taggingRule_version-1_aws_ami','high','tagging','false','false',NULL,24,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,24,'ASGC','2025-08-28','2025-08-28','ENABLED');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Fix inconsistencies and typos in new AWS AMI tagging policy row; align naming and params

  • policyName should be human-readable (consistent with other rows).
  • resolution has punctuation/spacing issues.
  • resolutionUrl likely needs a lowercase GitHub anchor.
  • JSON alexaKeyword has a typo and disagrees with the table column.
  • Add threadsafe param for consistency with other policies.

Apply this diff:

-INSERT  IGNORE INTO cf_PolicyTable (policyId, policyUUID, policyName, policyDisplayName, policyDesc, resolution, resolutionUrl, targetType, assetGroup, alexaKeyword, policyParams, policyFrequency, policyExecutable, policyRestUrl, policyType, policyArn, severity, category, autoFixAvailable, autoFixEnabled, allowList, waitingTime, maxEmailNotification, templateName, templateColumns, fixType, warningMailSubject, fixMailSubject, warningMessage, fixMessage, violationMessage, elapsedTime, userId, createdDate, modifiedDate, status) VALUES ('taggingRule_version-1_aws_ami','taggingRule_version-1_aws_ami','taggingRule_version-1_aws_ami','Assign Mandatory Tags to AWS AMI','Assigning mandatory tags to AMI is important for identifying resources, allocating costs, automation, security, and compliance purposes. Mandatory tags ensure consistency, manageability, cost-effectiveness, security, and compliance across your aws infrastructure.','Add the mandatory tags to the assets,Follow the Cloud Asset Tagging guidelines.','https://github.com/PaladinCloud/CE/wiki/AWS-Policy#Assign-Mandatory-Tags-to-AWS-AMI','ami','aws','awsamitaggingrule','{\"params\":[{\"encrypt\":false,\"value\":\",\",\"key\":\"splitterChar\"},{\"encrypt\":false,\"value\":\"check-for-missing-mandatory-tags\",\"key\":\"policyKey\"},{\"encrypt\":false,\"value\":\"high\",\"key\":\"severity\"},{\"encrypt\":false,\"value\":\"Application,Environment,Stack,Role\",\"key\":\"mandatoryTags\",\"isMandatory\":true,\"description\":\"Assets should have these mandatory tags\",\"defaultVal\":\"Application,Environment,Stack,Role\",\"displayName\":\"Mandatory tags\"},{\"isValueNew\":true,\"encrypt\":false,\"value\":\"tagging\",\"key\":\"policyCategory\"}],\"environmentVariables\":[],\"policyId\":\"taggingRule_version-1_aws_ami\",\"autofix\":false,\"alexaKeyword\":\"amitagginrule\",\"policyRestUrl\":\"\",\"targetType\":\"ami\",\"pac_ds\":\"aws\",\"assetGroup\":\"aws\",\"policyUUID\":\"taggingRule_version-1_aws_ami\",\"policyType\":\"ManagePolicy\"}','0 0/12 * * ? *','','','ManagePolicy','arn:aws:events:us-east-1:***REMOVED***:rule/taggingRule_version-1_aws_ami','high','tagging','false','false',NULL,24,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,24,'ASGC','2025-08-28','2025-08-28','ENABLED');
+INSERT  IGNORE INTO cf_PolicyTable (policyId, policyUUID, policyName, policyDisplayName, policyDesc, resolution, resolutionUrl, targetType, assetGroup, alexaKeyword, policyParams, policyFrequency, policyExecutable, policyRestUrl, policyType, policyArn, severity, category, autoFixAvailable, autoFixEnabled, allowList, waitingTime, maxEmailNotification, templateName, templateColumns, fixType, warningMailSubject, fixMailSubject, warningMessage, fixMessage, violationMessage, elapsedTime, userId, createdDate, modifiedDate, status) VALUES ('taggingRule_version-1_aws_ami','taggingRule_version-1_aws_ami','Assign Mandatory Tags to AWS AMI','Assign Mandatory Tags to AWS AMI','Assigning mandatory tags to AMI is important for identifying resources, allocating costs, automation, security, and compliance purposes. Mandatory tags ensure consistency, manageability, cost-effectiveness, security, and compliance across your AWS infrastructure.','Add the mandatory tags to the assets. Follow the Cloud Asset Tagging guidelines.','https://github.com/PaladinCloud/CE/wiki/AWS-Policy#assign-mandatory-tags-to-aws-ami','ami','aws','awsamitaggingrule','{\"params\":[{\"encrypt\":false,\"value\":\"true\",\"key\":\"threadsafe\"},{\"encrypt\":false,\"value\":\",\",\"key\":\"splitterChar\"},{\"encrypt\":false,\"value\":\"check-for-missing-mandatory-tags\",\"key\":\"policyKey\"},{\"encrypt\":false,\"value\":\"high\",\"key\":\"severity\"},{\"encrypt\":false,\"value\":\"Application,Environment,Stack,Role\",\"key\":\"mandatoryTags\",\"isMandatory\":true,\"description\":\"Assets should have these mandatory tags\",\"defaultVal\":\"Application,Environment,Stack,Role\",\"displayName\":\"Mandatory tags\"},{\"isValueNew\":true,\"encrypt\":false,\"value\":\"tagging\",\"key\":\"policyCategory\"}],\"environmentVariables\":[],\"policyId\":\"taggingRule_version-1_aws_ami\",\"autofix\":false,\"alexaKeyword\":\"awsamitaggingrule\",\"policyRestUrl\":\"\",\"targetType\":\"ami\",\"pac_ds\":\"aws\",\"assetGroup\":\"aws\",\"policyUUID\":\"taggingRule_version-1_aws_ami\",\"policyType\":\"ManagePolicy\"}','0 0/12 * * ? *','','','ManagePolicy','arn:aws:events:us-east-1:***REMOVED***:rule/taggingRule_version-1_aws_ami','high','tagging','false','false',NULL,24,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,24,'ASGC','2025-08-28','2025-08-28','ENABLED');
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
INSERT IGNORE INTO cf_PolicyTable (policyId, policyUUID, policyName, policyDisplayName, policyDesc, resolution, resolutionUrl, targetType, assetGroup, alexaKeyword, policyParams, policyFrequency, policyExecutable, policyRestUrl, policyType, policyArn, severity, category, autoFixAvailable, autoFixEnabled, allowList, waitingTime, maxEmailNotification, templateName, templateColumns, fixType, warningMailSubject, fixMailSubject, warningMessage, fixMessage, violationMessage, elapsedTime, userId, createdDate, modifiedDate, status) VALUES ('taggingRule_version-1_aws_ami','taggingRule_version-1_aws_ami','taggingRule_version-1_aws_ami','Assign Mandatory Tags to AWS AMI','Assigning mandatory tags to AMI is important for identifying resources, allocating costs, automation, security, and compliance purposes. Mandatory tags ensure consistency, manageability, cost-effectiveness, security, and compliance across your aws infrastructure.','Add the mandatory tags to the assets,Follow the Cloud Asset Tagging guidelines.','https://github.com/PaladinCloud/CE/wiki/AWS-Policy#Assign-Mandatory-Tags-to-AWS-AMI','ami','aws','awsamitaggingrule','{\"params\":[{\"encrypt\":false,\"value\":\",\",\"key\":\"splitterChar\"},{\"encrypt\":false,\"value\":\"check-for-missing-mandatory-tags\",\"key\":\"policyKey\"},{\"encrypt\":false,\"value\":\"high\",\"key\":\"severity\"},{\"encrypt\":false,\"value\":\"Application,Environment,Stack,Role\",\"key\":\"mandatoryTags\",\"isMandatory\":true,\"description\":\"Assets should have these mandatory tags\",\"defaultVal\":\"Application,Environment,Stack,Role\",\"displayName\":\"Mandatory tags\"},{\"isValueNew\":true,\"encrypt\":false,\"value\":\"tagging\",\"key\":\"policyCategory\"}],\"environmentVariables\":[],\"policyId\":\"taggingRule_version-1_aws_ami\",\"autofix\":false,\"alexaKeyword\":\"amitagginrule\",\"policyRestUrl\":\"\",\"targetType\":\"ami\",\"pac_ds\":\"aws\",\"assetGroup\":\"aws\",\"policyUUID\":\"taggingRule_version-1_aws_ami\",\"policyType\":\"ManagePolicy\"}','0 0/12 * * ? *','','','ManagePolicy','arn:aws:events:us-east-1:***REMOVED***:rule/taggingRule_version-1_aws_ami','high','tagging','false','false',NULL,24,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,24,'ASGC','2025-08-28','2025-08-28','ENABLED');
INSERT IGNORE INTO cf_PolicyTable (
policyId,
policyUUID,
policyName,
policyDisplayName,
policyDesc,
resolution,
resolutionUrl,
targetType,
assetGroup,
alexaKeyword,
policyParams,
policyFrequency,
policyExecutable,
policyRestUrl,
policyType,
policyArn,
severity,
category,
autoFixAvailable,
autoFixEnabled,
allowList,
waitingTime,
maxEmailNotification,
templateName,
templateColumns,
fixType,
warningMailSubject,
fixMailSubject,
warningMessage,
fixMessage,
violationMessage,
elapsedTime,
userId,
createdDate,
modifiedDate,
status
) VALUES (
'taggingRule_version-1_aws_ami',
'taggingRule_version-1_aws_ami',
'Assign Mandatory Tags to AWS AMI',
'Assign Mandatory Tags to AWS AMI',
'Assigning mandatory tags to AMI is important for identifying resources, allocating costs, automation, security, and compliance purposes. Mandatory tags ensure consistency, manageability, cost-effectiveness, security, and compliance across your AWS infrastructure.',
'Add the mandatory tags to the assets. Follow the Cloud Asset Tagging guidelines.',
'https://github.com/PaladinCloud/CE/wiki/AWS-Policy#assign-mandatory-tags-to-aws-ami',
'ami',
'aws',
'awsamitaggingrule',
'{"params":[{"encrypt":false,"value":"true","key":"threadsafe"},{"encrypt":false,"value":",","key":"splitterChar"},{"encrypt":false,"value":"check-for-missing-mandatory-tags","key":"policyKey"},{"encrypt":false,"value":"high","key":"severity"},{"encrypt":false,"value":"Application,Environment,Stack,Role","key":"mandatoryTags","isMandatory":true,"description":"Assets should have these mandatory tags","defaultVal":"Application,Environment,Stack,Role","displayName":"Mandatory tags"},{"isValueNew":true,"encrypt":false,"value":"tagging","key":"policyCategory"}],"environmentVariables":[],"policyId":"taggingRule_version-1_aws_ami","autofix":false,"alexaKeyword":"awsamitaggingrule","policyRestUrl":"","targetType":"ami","pac_ds":"aws","assetGroup":"aws","policyUUID":"taggingRule_version-1_aws_ami","policyType":"ManagePolicy"}',
'0 0/12 * * ? *',
'',
'',
'ManagePolicy',
'arn:aws:events:us-east-1:***REMOVED***:rule/taggingRule_version-1_aws_ami',
'high',
'tagging',
'false',
'false',
NULL,
24,
1,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
24,
'ASGC',
'2025-08-28',
'2025-08-28',
'ENABLED'
);
🤖 Prompt for AI Agents
In installer/resources/pacbot_app/files/DB_Policy.sql around line 610, the new
AWS AMI tagging policy row contains naming/format inconsistencies and typos:
change policyName to a human-readable string consistent with other rows; fix the
resolution text punctuation and spacing; update resolutionUrl to use the
lowercase GitHub anchor; correct the JSON alexaKeyword typo so it matches the
table column name and ensure the JSON is valid; and add the threadsafe parameter
(set consistently with other policy rows). Make only these edits in that row so
the row’s columns align with the rest of the table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants