Fix vulnerability in identifier for extension configuration (#10090)

* PR https://github.com/flutter/devtools/pull/9981 added the `identifier` getter to `DevToolsExtensionConfig`, which built it based on the `packageName`, `name`, and `version`, separated by underscores. This makes it vulnerable if
package names contain underscores.

```
String get identifier => packageName == displayName
    ? '${displayName}_$version'
    : '${packageName}_${displayName}_$version';
```

If a legitimate extension belongs to package device_preview (with name: device_preview and version: 1.0.0), its `packageName == displayName` branch produces: `device_preview_1.0.0` An attacker can publish a package named device and set `name: preview`and `version: 1.0.0`in its config.yaml, and because `packageName != displayName`, it takes the second branch (`${packageName}_${displayName}_$version`), which also produces: device_preview_1.0.0.

This change uses a hyphen between `packageName` and `displayName` and validates that the name and version are valid.

* Address code review comments

* Update NEXT_RELEASE_NOTES.md

* release notes formatting
9 files changed
tree: 04cabe28ed0301768a2d6c840a433e6ba99586ae
  1. .agents/
  2. .gemini/
  3. .github/
  4. .vscode/
  5. _markdown_images/
  6. docs/
  7. packages/
  8. third_party/
  9. tool/
  10. .gitattributes
  11. .gitignore
  12. AGENTS.md
  13. analysis_options.yaml
  14. AUTHORS
  15. BETA_TESTING.md
  16. CLAUDE.md
  17. CODE_OF_CONDUCT.md
  18. CODEOWNERS
  19. CONTRIBUTING.md
  20. DEBUGGING.md
  21. devtools_options.yaml
  22. DOCUMENTATION.md
  23. flutter-candidate.txt
  24. LICENSE
  25. pubspec.lock
  26. pubspec.yaml
  27. README.md
  28. STYLE.md
  29. TESTING.md
  30. TRIAGE.md
README.md

Dart & Flutter DevTools

Build Status OpenSSF Scorecard

What is this?

Dart & Flutter DevTools is a suite of performance tools for Dart and Flutter.

Getting started

For documentation on installing and trying out DevTools, please see our docs.

Contributing and development

Contributions welcome! See our contributing page for an overview of how to build and contribute to the project.

Terms and Privacy

By using Dart DevTools, you agree to the Google Terms of Service. To understand how we use data collected from this service, see the Google Privacy Policy.