Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Malware / Trojaner / Viren3 Cyber Threats That Defined the Summer of 2026(24.09.2026 um 16:44 Uhr)
IT Security NachrichtenMeta testet menschliche Assistenten für Muse(24.09.2026 um 17:09 Uhr)
IT Security NachrichtenTui Airlines nehmen Vertriebsplattform von Airxelerate in Betrieb(24.09.2026 um 13:32 Uhr)
Malware / Trojaner / Viren3 Cyber Threats That Defined the Summer of 2026(24.09.2026 um 16:44 Uhr)
IT Security NachrichtenMeta testet menschliche Assistenten für Muse(24.09.2026 um 17:09 Uhr)
IT Security NachrichtenTui Airlines nehmen Vertriebsplattform von Airxelerate in Betrieb(24.09.2026 um 13:32 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

How to Include Version, Git Commit, and Build Date in Your Angular Builds

Knowing the exact version of your Angular app can be really helpful. This article will teach you how to add your app's package version, git commit hash, and build date to your builds. You'll also learn how to access this information within…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

Knowing the exact version of your Angular app can be really helpful. This article will teach you how to add your app's package version, git commit hash, and build date to your builds. You'll also learn how to access this information within your Angular app.





  1. Create a File for Version Information




    • Make a file named version.ts in the src/environments/ folder.

    • Add placeholders for the app version, build date, and commit hash, like this:


     // src/environments/version.ts
    export const version = '0.0.0-development';
    export const buildDate = Date.now();
    export const commitHash = 'aaaaaa';







  • Then, you can use this version information in your Angular code. Here's how you might do it:


     import { Injectable } from '@angular/core';
    import { version, buildDate, commitHash } from 'src/environments/version';

    @Injectable({
    providedIn: 'root'
    })
    export class VersionService {
    getVersion(): string {
    return `Version ${version}, commit ${commitHash}, built at ${buildDate}`;
    }
    }





2. Write a Script to Update Version Information




  • Make a file called update-version.js in your project's main folder.


  • This script will automatically fill in the real version and commit hash using Node.js code. Here's an example:


     const fs = require('fs');
    const execSync = require('child_process').execSync;

    const packageJson = require('./package.json');
    const commitHash = execSync('git rev-parse HEAD').toString().trim();
    const buildDate = new Date().toISOString();

    const content = `
    export const version = '
    ${packageJson.version}';
    export const buildDate = '
    ${buildDate}';
    export const commitHash = '
    ${commitHash}';
    `
    ;

    fs.writeFileSync('./src/environments/version.prod.ts', content);





3. Add a Prebuild Script to Your Project




  • In your package.json file, add a prebuild script in the "scripts" section.


  • This script should run node update-version.js before each build. Your package.json should include something like this:


     "scripts": {
    "prebuild": "node update-version.js"
    }





4. Update Your Build Configuration





  • In the angular.json file, make a change to use version.prod.ts instead of version.ts when you build your app. Here's how you can set it up:


     "fileReplacements": [
    {
    "replace": "src/environments/version.ts",
    "with": "src/environments/version.prod.ts"
    }
    ]





5. Ignore the Generated Version File




  • If you want, you can add version.prod.ts to your .gitignore file. This keeps the automatically generated file out of your code repository.

SOC Incident Playbook: Vulnerability Remediation & Verification
title: Detect Exploitation - How to Include Version, Git Commit, and Build Date in Your Angular Builds
id: 890b2e84-4678-451b-af55-a518d29464f7
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-24
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-24"
        description = "YARA Signature for "
    strings:
        $str = "How to Include Version, Git Co" ascii wide
    condition:
        any of them
}
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich How to Include Version, Git Commit, and .... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten How to Include Version, Git Commit, and Build Date in Your Angular Builds

Thematisch verwandte Begriffe: Include, Version, Commit, Build · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-97360 | HFS2 version 2.4.0 and earlier contains an unauthenticated arbitrary fil…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel TTP ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick