BaşlayınÜcretsiz Başlayın

Crafting secure prompts

With MoveIt's tracking module now well-tested, your team is ready to tackle security. During a code review, a colleague finds a potential SQL injection vulnerability in the shipment lookup function. They ask AI to help fix it.

Here are two prompts they're considering:

Prompt A: "Fix this SQL injection vulnerability in the shipment lookup."

Prompt B: "This shipment lookup is vulnerable to SQL injection. First, identify what user inputs could be exploited. Then, fix the vulnerability using parameterized queries instead of string concatenation. Finally, generate test cases with common injection payloads to verify the fix."

Which prompt is more likely to produce a robust, long-term fix?

Bu egzersiz

Advanced AI-Assisted Coding for Developers

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

İnteraktif egzersizlerimizden biriyle teoriyi pratiğe dökün

Egzersizi başlat