(compose_file: &str)
| 44 | } |
| 45 | |
| 46 | fn app_id_of(compose_file: &str) -> String { |
| 47 | fn truncate40(s: &str) -> &str { |
| 48 | if s.len() > 40 { |
| 49 | &s[..40] |
| 50 | } else { |
| 51 | s |
| 52 | } |
| 53 | } |
| 54 | truncate40(&hex_sha256(compose_file)).to_string() |
| 55 | } |
| 56 | |
| 57 | /// Validate the VM label, restricting it to a safe character set to prevent injection vectors. |
| 58 | fn validate_label(label: &str) -> Result<()> { |
no test coverage detected